Копятся процессы apache

Алексей systeamx at gmail.com
Wed May 20 01:36:26 MSD 2009


Здравствуйте!

Сервер работает в связке nginx+apache (mod_php).
На сервере предоставляется хостинг поэтому довольно много сайтов - 300-600.

В течении дня возникают ситуации когда копятся большое кол-во
процессов апача, которые естественно провоцируют рост LA иногда сразу
до 20-30.
После перезапуска апача всё встаёт на свои места, но не сильно
надолго. Причём с виду ничего особенного - идут стандартные запросы...

Подскажите пожалуйста, что можно предпринять чтобы предотвратить рост
процессов - возможно ли как-то ограничить нагрузку на CPU, или сделать
настройки в самом апаче от этого? Возможно ли тут влияние настроек
nginx?
Вот типичный список процессов во время перегрузки:

===================================
%CPU CPU  NI S     TIME COMMAND
 0.1   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.1   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 D 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 D 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:19 nginx: worker process
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.2   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:20 nginx: worker process
 0.3   -   0 D 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 D 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 D 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.3   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.4   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.4   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.4   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.4   -   0 S 00:00:01 /usr/local/apache/bin/httpd -k start
 0.4   -   0 S 00:00:01 /usr/local/apache/bin/httpd -k start
 0.4   -   0 S 00:00:01 /usr/local/apache/bin/httpd -k start
 0.5   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.5   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.5   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.5   -   0 S 00:00:00 /usr/local/apache/bin/httpd -k start
 0.5   -   0 S 00:00:01 /usr/local/apache/bin/httpd -k start
 0.6   -   0 S 00:00:01 /usr/local/apache/bin/httpd -k start
 0.6   -   0 S 00:00:01 /usr/local/apache/bin/httpd -k start
 0.7   -   0 S 00:00:01 /usr/local/apache/bin/httpd -k start
 0.7   -   0 S 00:00:02 /usr/local/apache/bin/httpd -k start
 1.2   -   0 S 00:00:03 /usr/local/apache/bin/httpd -k start
 1.4   -   0 S 00:00:04 /usr/local/apache/bin/httpd -k start
===================================


More information about the nginx-ru mailing list