php-fastcgi and memory leaks

Reinis Rozitis r at roze.lv
Mon Mar 31 04:56:59 MSD 2008


No matter how I look at it this doesnt seem right:

First - why and how the heck are you able to "smash" ab against spawn-fcgi 
(or I do misunderstood something)? Because spawn-fcgi isnt a permanent 
process nor does it handle any HTTP requests (or acts as fcgi gateway to 
handle the requests from nginx) .. spawn-fcgi is only an executable provided 
with lighttpd to spawn PHP master process (with setuid/setgid feature when 
the adaptive spawning on lighty was basically disabled).
You can fully do the same just with php executable (built as fastcgi) eg 
provide port/socket and other settings from command line (and some from ENV 
variables).

So I can't really get how can spawn-fcgi eat up ram because it shouldnt be 
on the process list at all..


Second - MySQL ram usage on the other hand is unbelievable small.. but thats 
another discussion :)


rr

----- Original Message ----- 
From: "Thomas" <iamkenzo at gmail.com>
To: <nginx at sysoev.ru>
Sent: Saturday, March 29, 2008 11:42 PM
Subject: Re: php-fastcgi and memory leaks


> Hi Phillip,
>
> As promised I have been trying to smash my spawn-fcgi process with ab
> but with no success. The cpu went crazy as expected, but the memory
> remained low. I don't if I am not testing enough. I was testing
> retrieving the index page of a PunBB forum hosted on my server. With
> too high concurrency, ab would stop benchmarking because of php-cgi
> starting to fail connections. spawn-fcgi uses 5MB of memory and MySQL
> 21MB.
>
> I am using Ubuntu 7.10 Server Edition with all official Ubuntu packages.
>
> And thanks for sharing your monitrc file ;-)
>
>
> 






More information about the nginx mailing list