Предельно минимальный расход ресурсов ВПС

BasePelleta
На сайте с 29.05.2008
Offline
120
#11

Отрублил в dovecot imap

Теперь использование памяти -

204540k

BasePelleta добавил 29.07.2010 в 20:16

Ошибка HTTP:500 - Server internal error

Это, что nginx не справляется?

BasePelleta добавил 29.07.2010 в 20:31

tail -50 /var/log/nginx/error.log

2010/07/29 19:25:55 [info] 20033#0: *2892 client 66.249.71.153 closed keepalive connection
2010/07/29 19:26:24 [info] 20033#0: *3051 client 207.46.13.47 closed keepalive connection (104: Connection reset by peer)
2010/07/29 19:26:25 [info] 20033#0: *3057 client 94.246.126.114 closed keepalive connection
2010/07/29 19:26:25 [info] 20033#0: *3060 client 94.246.126.114 closed keepalive connection
2010/07/29 19:26:31 [info] 20033#0: *3093 client 94.246.126.114 closed keepalive connection
2010/07/29 19:26:34 [info] 20033#0: *3112 client 95.26.187.24 closed keepalive connection
2010/07/29 19:26:35 [info] 20033#0: *3110 client 95.26.187.24 closed keepalive connection
2010/07/29 19:26:39 [info] 20033#0: *3146 client 94.246.126.114 closed keepalive connection
2010/07/29 19:26:40 [info] 20033#0: *3147 client 94.246.126.114 closed keepalive connection
2010/07/29 19:26:41 [info] 20033#0: *3160 client 94.246.126.114 closed keepalive connection
2010/07/29 19:26:50 [info] 20033#0: *3195 client 94.246.126.114 closed keepalive connection
2010/07/29 19:26:52 [info] 20033#0: *3200 client 94.246.126.114 closed keepalive connection
2010/07/29 19:26:52 [info] 20033#0: *3201 client 94.246.126.114 closed keepalive connection
2010/07/29 19:27:52 [info] 20033#0: *3378 client 66.249.71.153 closed keepalive connection
2010/07/29 19:27:52 [info] 20033#0: *3418 client 94.246.126.114 closed keepalive connection
2010/07/29 19:27:53 [info] 20033#0: *3419 client 94.246.126.114 closed keepalive connection
2010/07/29 19:27:54 [info] 20033#0: *3424 client 94.246.126.114 closed keepalive connection
2010/07/29 19:28:00 [info] 20033#0: *3445 client 94.246.126.114 closed keepalive connection
2010/07/29 19:28:00 [info] 20033#0: *3448 client 94.246.126.114 closed keepalive connection
2010/07/29 19:28:00 [info] 20033#0: *3449 client 94.246.126.114 closed keepalive connection
2010/07/29 19:28:07 [info] 20033#0: *3480 client 94.246.126.114 closed keepalive connection
2010/07/29 19:28:07 [info] 20033#0: *3481 client 94.246.126.114 closed keepalive connection
2010/07/29 19:28:07 [info] 20033#0: *3482 client 94.246.126.114 closed keepalive connection
2010/07/29 19:28:38 [info] 20033#0: *3554 client 77.109.9.10 closed keepalive connection
2010/07/29 19:28:41 [info] 20033#0: *3570 client 194.242.103.136 closed keepalive connection
2010/07/29 19:29:18 [info] 20033#0: *3694 client 66.249.71.153 closed keepalive connection

Это видимо 500 ошибка?

LM
На сайте с 18.10.2009
Offline
117
#12
BasePelleta:
Ошибка HTTP:500 - Server internal error
Это, что nginx не справляется?

Напишите в топике кусок лога ошибок апача /var/log/httpd/error.log

BasePelleta
На сайте с 29.05.2008
Offline
120
#13

Лог ошибок апача

# tail /var/log/httpd/error_log
[Wed Jul 28 13:26:23 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jul 28 13:26:23 2010] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 28 13:26:23 2010] [notice] Digest: done
eAccelerator: Could not allocate 33554432 bytes, the maximum size the kernel allows is 2097152 bytes. Lower the amount of memory request or increase the limit in /proc/sys/kernel/shmmax.
PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0
PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0
[Wed Jul 28 13:27:12 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jul 28 13:27:12 2010] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 28 13:27:12 2010] [notice] Digest: done
eAccelerator: Could not allocate 33554432 bytes, the maximum size the kernel allows is 1048576 bytes. Lower the amount of memory request or increase the limit in /proc/sys/kernel/shmmax.
PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0
PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0
[Wed Jul 28 13:29:02 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jul 28 13:29:02 2010] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 28 13:29:02 2010] [notice] Digest: done
eAccelerator: shmmax should be at least 2MBPHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0
PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0
[Wed Jul 28 13:29:08 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jul 28 13:29:09 2010] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 28 13:29:09 2010] [notice] Digest: done
eAccelerator: shmmax should be at least 2MBPHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0
PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0
[Wed Jul 28 13:40:12 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jul 28 13:40:12 2010] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 28 13:40:12 2010] [notice] Digest: done
[Wed Jul 28 13:40:13 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Wed Jul 28 13:45:30 2010] [notice] caught SIGTERM, shutting down
[Wed Jul 28 13:45:30 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jul 28 13:45:30 2010] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 28 13:45:30 2010] [notice] Digest: done
[Wed Jul 28 13:45:30 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Wed Jul 28 15:23:07 2010] [notice] caught SIGTERM, shutting down
[Wed Jul 28 15:23:07 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Jul 28 15:23:07 2010] [notice] Digest: generating secret for digest authentication ...
[Wed Jul 28 15:23:07 2010] [notice] Digest: done
[Wed Jul 28 15:23:07 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Thu Jul 29 14:44:29 2010] [notice] caught SIGTERM, shutting down
[Thu Jul 29 14:44:30 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jul 29 14:44:30 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jul 29 14:44:30 2010] [notice] Digest: done
[Thu Jul 29 14:44:30 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Thu Jul 29 15:00:58 2010] [notice] caught SIGTERM, shutting down
[Thu Jul 29 15:05:08 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jul 29 15:05:08 2010] [notice] Digest: generating secret for digest authentication ...
[Thu Jul 29 15:05:08 2010] [notice] Digest: done
[Thu Jul 29 15:05:08 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Thu Jul 29 15:12:04 2010] [error] [client 127.0.0.1] Invalid method in request \xff\xf4\xff\xfd\x06\xff\xf4\xff\xfd\x06\xff\xf4\xff\xfd\x06
::1 - - [28/Jul/2010:12:50:42 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:13:46:12 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:14:17:13 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:14:23:58 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:14:37:35 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:15:00:29 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:15:16:55 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:15:25:45 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:15:25:46 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:15:25:47 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:15:25:50 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:15:25:51 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:15:35:11 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:17:57:12 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:17:57:33 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:17:57:46 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:17:58:06 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:17:58:10 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:17:59:03 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:20:17:43 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [28/Jul/2010:20:23:18 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [29/Jul/2010:13:42:15 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [29/Jul/2010:13:43:07 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
127.0.0.1 - - [29/Jul/2010:15:12:04 +0300] "\xff\xf4\xff\xfd\x06\xff\xf4\xff\xfd\x06\xff\xf4\xff\xfd\x06" 501 303 "-" "-"
::1 - - [29/Jul/2010:15:17:30 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [29/Jul/2010:17:57:29 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [29/Jul/2010:18:51:02 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [29/Jul/2010:19:41:01 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"
::1 - - [29/Jul/2010:19:48:39 +0300] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.3 (CentOS) (internal dummy connection)"

Как видите, здесь нет упоминания об HTTP:500 - Server internal error

M
На сайте с 16.09.2009
Offline
278
#14
LinuxMan:
Я заметил, что на OpenVZ памяти linux использует больше, чем на virtuozzo... На virtuozzo сервер с такими параметрами меньше бы памяти "кушал" :)

Ага, ВНЕЗАПНО! На самом деле, совершенно закономерная вещь. Посмотрите ихние родные сайты, там рассматриваются различии этих продуктов - поймете отчего так.

Как правило, более профессиональные хостинги работают на virtuozzo.

BasePelleta:
Лог ошибок апача
Как видите, здесь нет упоминания об HTTP:500 - Server internal error

За этот период Вы точно наблюдали 500-ю ошибку (сравните с логом nginx-а - там есть 500-я ошибка)? Вы определенно смотрите не тот access-лог для апача. Наверное используется какая-то панель, они логи кладут обычно отдельно.

Абонементное сопровождение серверов (Debian) Отправить личное сообщение (), написать письмо ().
BasePelleta
На сайте с 29.05.2008
Offline
120
#15

Параметры моего nginx

user nginx;
worker_processes 1;
worker_rlimit_nofile 100000;

#error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
error_log /var/log/nginx/error.log info;

pid /var/run/nginx.pid;




events {
worker_connections 1024;
use epoll;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

client_max_body_size 16m;
access_log /var/log/nginx/access.log main;

sendfile on;
tcp_nopush on;
tcp_nodelay on;
server_tokens off;
gzip on;
gzip_static on;
gzip_comp_level 5;
gzip_min_length 1024;
keepalive_timeout 65;
limit_zone myzone $binary_remote_addr 10m;

Параметры апача

Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers 2
MinSpareServers 1
MaxSpareServers 5
ServerLimit 110
MaxClients 100
MaxRequestsPerChild 4000
</IfModule>
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

R
На сайте с 14.02.2010
Offline
77
#16
myhand:
Ага, ВНЕЗАПНО! На самом деле, совершенно закономерная вещь. Посмотрите ихние родные сайты, там рассматриваются различии этих продуктов - поймете отчего так.

это с какого перепугуу вдруг?

эти контейнеры практически ничем не отличаются, ну кроме плюшек для администрирования (gui и скрипты, панели), vzfs (которую с успехом заменяет aufs), да отсутствия версии под венду

наверное глупо предполагать, что malloc() в openvz сожрет больше чем malloc() в virtuozzo-containers :D

M
На сайте с 16.09.2009
Offline
278
#17
r0mik:
vzfs (которую с успехом заменяет aufs)

А Вы рассматривали openvz с учетом aufs? Теоретически это должно давать аналогичный функционал. Насколько эффективно - не знаю. Не поделитесь?

r0mik:
наверное глупо предполагать, что malloc() в openvz сожрет больше чем malloc() в virtuozzo-containers :D

Да. Только Вы не говорили про malloc - а про потребление памяти на openvz vs virtuozzo в целом. А в этом случае дело не в malloc - а как раз в vzfs.

BasePelleta, хорошо, конечно, что Вы привели "параметры" апача/nginx - только Вам ведь задавали другие вопросы.

Кстати, по тому как привели - совершенно очевидно полное отсутствие понимания цитируемого. Ну не может одновременно у апача работать два MPM модуля (prefork и worker).

Я думаю, лучшие советы Вам - (1) оставить все как есть, (2) перейти на другой тарифный план (3) пригласить специалиста, чтобы он помог оптимизировать VPS или предложить Вам выбор вариантов 1/2 более обоснованно, с учетом увиденного "на месте".

Andreyka
На сайте с 19.02.2005
Offline
822
#18

Я советую 2+3

Не стоит плодить сущности без необходимости
BasePelleta
На сайте с 29.05.2008
Offline
120
#19
очевидно полное отсутствие понимания цитируемого

Согласен.

может одновременно у апача работать два MPM модуля (prefork и worker)

Какой оставить если у меня на фронтенде нгинкс, а на бекенде апач?

оставить все как есть

Предлагаю вариант - побалансировать, посмотреть.

перейти на другой тарифный план

добавить памяти и проца?

Так 512 с головой хватит для 30 сайтов с 300 уников

пригласить специалиста, чтобы он помог оптимизировать VPS

В итоге сам знать не буду.

Как видите из моих постов, знание ситуации у меня несистемное, следовательно, при чтении манов

возможны заблуждения, а здесь - на форуме практики!

Вообще, спасибо всем, кто отвечает мне!

Вот заметил следующее:

Переехал с шаред-хостинга, где скрипты работали отлично, фото загружалось, проверка валидности фото работала!

Поднял впс в связке апач и нгинкс. Все работает, только фото не аплодится так как
срабатывает проверка на валидность пишет - Извините, 1.jpg не является допустимым графическим файлом

Настройки скриптов не трогал!
В чем проблема?

Поднимал апач без нгинкса на другом впсе - все работает!

Видимо, в параметре нгинкса дело!

LM
На сайте с 18.10.2009
Offline
117
#20
BasePelleta:
добавить памяти и проца?
Так 512 с головой хватит для 30 сайтов с 300 уников

ТС, напишите в файле /etc/init.d/rc где-нибудь вверху строчку ulimit -s 2048, перезапустите vds и будет вам счастье в виде освободившейся оперативки.

Ну и статейку прочтите для интереса, что вы такой строчкой сделаете http://habrahabr.ru/blogs/hosting/53236/

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий