php-fastcgi and memory leaks
Phillip B Oldham
phill at theactivitypeople.co.uk
Wed Mar 26 13:00:49 MSK 2008
# php-fastcgi (webserver)
# --------------------
check process php-fastcgi with pidfile /var/run/php-fastcgi.pid
start program = "/etc/init.d/php-fastcgi start"
stop program = "/etc/init.d/php-fastcgi stop"
if cpu usage > 95% for 3 cycles then alert
if totalmem usage > 90% for 1 cycles then restart
depends php-fastcgi_init
depends php-fastcgi_bin
check file php-fastcgi_init with path /etc/init.d/php-fastcgi
group www
check file php-fastcgi_bin with path /usr/local/bin/php-fcgi
group www
And my php-fcgi script looks like this:
#!/bin/bash
PHP_FCGI_MAX_REQUESTS=25
export PHP_FCGI_MAX_REQUESTS
/usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 10005 -u apache -g apache -C 3
-f /usr/local/bin/php-cgi -P /var/run/php-fastcgi.pid
Doesn't look as though PHP_FCGI_MAX_REQUESTS is being honoured though,
which is annoying. I've even tried setting it to 1 (so the child dies
after every request) but it has no effect. I think in the whole time
I've been working with php under nginx in this way I've only seen a
<defunct> php process once.
Thomas wrote:
> Hi Phillip,
>
> Do you mind sharing your monitrc section concerning the monitoring of
> the spawn-fcgi process? I am currently unable to do so. This way I
> could hammer my php apps with httperf and see if I also have this
> memory leaks problem.
>
>
> On Wed, Mar 26, 2008 at 9:12 AM, Phillip B Oldham
> <phill at theactivitypeople.co.uk> wrote:
>
>> I'm using spawn-fcgi, from the lighttpd project. It seemed the easiest way
>> to manage the php instances. Is there a better way to spawn php instances
>> for nginx?
>>
>>
>>
>> Yordan Georgiev wrote:
>> Hello Phillip,
>>
>> How to create you are fastcgi gataway?
>>
>> --
>> Please excuse my bad english...
>>
>> С уважение,
>> Й. Георгиев.
>>
>> WEB: http://gigavolt-bg.net/
>> Blog: http://live.gigavolt-bg.net/
>>
>> --
>>
>>
>>
>> Phillip B Oldham
>> The Activity People
>> phill at theactivitypeople.co.uk ________________________________
>>
>>
>> Policies
>>
>> This e-mail and its attachments are intended for the above named
>> recipient(s) only and may be confidential. If they have come to you in
>> error, please reply to this e-mail and highlight the error. No action should
>> be taken regarding content, nor must you copy or show them to anyone.
>>
>> This e-mail has been created in the knowledge that Internet e-mail is not a
>> 100% secure communications medium, and we have taken steps to ensure that
>> this e-mail and attachments are free from any virus. We must advise that in
>> keeping with good computing practice the recipient should ensure they are
>> completely virus free, and that you understand and observe the lack of
>> security when e-mailing us. ________________________________
>>
>>
--
*Phillip B Oldham*
The Activity People
phill at theactivitypeople.co.uk <mailto:phill at theactivitypeople.co.uk>
------------------------------------------------------------------------
*Policies*
This e-mail and its attachments are intended for the above named
recipient(s) only and may be confidential. If they have come to you in
error, please reply to this e-mail and highlight the error. No action
should be taken regarding content, nor must you copy or show them to anyone.
This e-mail has been created in the knowledge that Internet e-mail is
not a 100% secure communications medium, and we have taken steps to
ensure that this e-mail and attachments are free from any virus. We must
advise that in keeping with good computing practice the recipient should
ensure they are completely virus free, and that you understand and
observe the lack of security when e-mailing us.
------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phill.vcf
Type: text/x-vcard
Size: 261 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx/attachments/20080326/ee9b5315/attachment.vcf>
More information about the nginx
mailing list