Hello
Gathering experiences from some other members of Linode forums , I decided to setup mpm-worker with fcgid and suexec. Everything works as I expect it to do and I already see some better performance. Thing that annoys me is that cgi processes keep on running even if atm server is in idle and without any http connections
Here is just snip of ps aux:
Code:
www-data 11943 0.0 0.7 5472 1944 ? S 16:29 0:00 /usr/sbin/apache2 -k start
www-data 11944 0.0 0.7 6616 1924 ? S 16:29 0:00 /usr/sbin/apache2 -k start
www-data 11945 0.0 1.6 63180 4164 ? Sl 16:29 0:00 /usr/sbin/apache2 -k start
www-data 11946 0.0 1.6 63172 4168 ? Sl 16:29 0:00 /usr/sbin/apache2 -k start
amar 12124 0.0 1.9 17816 4996 ? Ss 21:11 0:00 /usr/lib/cgi-bin/php
amar 12125 0.0 1.9 17816 5000 ? Ss 21:11 0:00 /usr/lib/cgi-bin/php
amar 12126 0.0 1.4 18072 3724 ? S 21:11 0:00 /usr/lib/cgi-bin/php
amar 12127 0.0 1.4 18072 3724 ? S 21:11 0:00 /usr/lib/cgi-bin/php
amar 12128 0.0 1.4 18072 3724 ? S 21:11 0:00 /usr/lib/cgi-bin/php
amar 12129 0.0 1.4 18072 3724 ? S 21:11 0:00 /usr/lib/cgi-bin/php
amar 12130 0.0 1.4 18072 3720 ? S 21:11 0:00 /usr/lib/cgi-bin/php
amar 12131 0.0 1.4 18072 3720 ? S 21:11 0:00 /usr/lib/cgi-bin/php
amar 12132 0.0 1.4 18072 3720 ? S 21:11 0:00 /usr/lib/cgi-bin/php
amar 12133 0.0 1.4 18072 3720 ? S 21:11 0:00 /usr/lib/cgi-bin/php
amar 12134 0.0 1.9 17816 4996 ? Ss 21:11 0:00 /usr/lib/cgi-bin/php
amar 12135 0.0 1.4 18072 3720 ? S 21:11 0:00 /usr/lib/cgi-bin/php
amar 12136 0.0 1.4 18072 3720 ? S 21:11 0:00 /usr/lib/cgi-bin/php
amar 12137 0.0 1.4 18072 3720 ? S 21:11 0:00 /usr/lib/cgi-bin/php
amar 12138 0.0 1.4 18072 3720 ? S 21:11 0:00 /usr/lib/cgi-bin/php
See? Why 25 of them? Why they are up for hours even there is no http connections to server? Where could I tweak this ?
Here is my wrapper:
Code:
#!/bin/sh
#
# sample PHP FastCGI wrapper
PHPRC="/etc/php5/cgi/" # directory which contains php.ini
PHP_FCGI_CHILDREN=4
PHP_FCGI_MAX_REQUESTS=1000
export PHPRC PHP_FCGI_CHILDREN PHP_FCGI_MAX_REQUESTS
exec /usr/lib/cgi-bin/php
Here is my mpm-worker:
Code:
<IfModule mpm_worker_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0
ThreadStackSize 2097152
</IfModule>
Regards
A.