<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Helvetica, Arial, sans-serif">Out of
interest, if I were to add the following to my nginx.conf:<br>
<br>
env PHP_FCGI_MAX_REQUESTS=10;<br>
<br>
Would that be picked up by php?<br>
</font></font><br>
Rob Schultz wrote:
<blockquote cite="mid:9951001B-5C83-4395-8C7C-943E792217DF@gmail.com"
 type="cite">I am not sure if this is "Gentoo" specific but they use
ALLOWED_ENV settings when using spawn-fcgi here is the two relevant
files
  <br>
  <br>
<a class="moz-txt-link-freetext" href="http://www.pastie.org/private/scbfzxfcvfqqdkohjdmw">http://www.pastie.org/private/scbfzxfcvfqqdkohjdmw</a>
  <br>
  <br>
On Mar 26, 2008, at 5:00 AM, Phillip B Oldham wrote:
  <br>
  <br>
  <blockquote type="cite">#   php-fastcgi (webserver)
    <br>
#   --------------------
    <br>
    <br>
check process php-fastcgi with pidfile /var/run/php-fastcgi.pid
    <br>
  start program = "/etc/init.d/php-fastcgi start"
    <br>
  stop  program = "/etc/init.d/php-fastcgi stop"
    <br>
  if cpu usage &gt; 95% for 3 cycles then alert
    <br>
  if totalmem usage &gt; 90% for 1 cycles then restart
    <br>
  depends php-fastcgi_init
    <br>
  depends php-fastcgi_bin
    <br>
    <br>
check file php-fastcgi_init with path /etc/init.d/php-fastcgi
    <br>
  group www
    <br>
    <br>
check file php-fastcgi_bin with path /usr/local/bin/php-fcgi
    <br>
  group www
    <br>
    <br>
And my php-fcgi script looks like this:
    <br>
    <br>
#!/bin/bash
    <br>
PHP_FCGI_MAX_REQUESTS=25
    <br>
export PHP_FCGI_MAX_REQUESTS
    <br>
/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
    <br>
    <br>
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
&lt;defunct&gt; php process once.
    <br>
    <br>
Thomas wrote:
    <br>
    <blockquote type="cite">Hi Phillip,
      <br>
      <br>
Do you mind sharing your monitrc section concerning the monitoring of
      <br>
the spawn-fcgi process? I am currently unable to do so. This way I
      <br>
could hammer my php apps with httperf and see if I also have this
      <br>
memory leaks problem.
      <br>
      <br>
      <br>
On Wed, Mar 26, 2008 at 9:12 AM, Phillip B Oldham
      <br>
<a class="moz-txt-link-rfc2396E" href="mailto:phill@theactivitypeople.co.uk">&lt;phill@theactivitypeople.co.uk&gt;</a> wrote:
      <br>
      <br>
      <blockquote type="cite">I'm using spawn-fcgi, from the lighttpd
project. It seemed the easiest way
        <br>
to manage the php instances. Is there a better way to spawn php
instances
        <br>
for nginx?
        <br>
        <br>
        <br>
        <br>
Yordan Georgiev wrote:
        <br>
Hello Phillip,
        <br>
        <br>
How to create you are fastcgi gataway?
        <br>
        <br>
--
        <br>
Please excuse my bad english...
        <br>
        <br>
С уважение,
        <br>
Й. Георгиев.
        <br>
        <br>
WEB: <a class="moz-txt-link-freetext" href="http://gigavolt-bg.net/">http://gigavolt-bg.net/</a>
        <br>
Blog: <a class="moz-txt-link-freetext" href="http://live.gigavolt-bg.net/">http://live.gigavolt-bg.net/</a>
        <br>
        <br>
--
        <br>
        <br>
        <br>
        <br>
Phillip B Oldham
        <br>
The Activity People
        <br>
<a class="moz-txt-link-abbreviated" href="mailto:phill@theactivitypeople.co.uk">phill@theactivitypeople.co.uk</a> ________________________________
        <br>
        <br>
        <br>
Policies
        <br>
        <br>
This e-mail and its attachments are intended for the above named
        <br>
recipient(s) only and may be confidential. If they have come to you in
        <br>
error, please reply to this e-mail and highlight the error. No action
should
        <br>
be taken regarding content, nor must you copy or show them to anyone.
        <br>
        <br>
This e-mail has been created in the knowledge that Internet e-mail is
not a
        <br>
100% secure communications medium, and we have taken steps to ensure
that
        <br>
this e-mail and attachments are free from any virus. We must advise
that in
        <br>
keeping with good computing practice the recipient should ensure they
are
        <br>
completely virus free, and that you understand and observe the lack of
        <br>
security when e-mailing us. ________________________________
        <br>
        <br>
        <br>
      </blockquote>
    </blockquote>
    <br>
-- <br>
    <br>
*Phillip B Oldham*
    <br>
The Activity People
    <br>
<a class="moz-txt-link-abbreviated" href="mailto:phill@theactivitypeople.co.uk">phill@theactivitypeople.co.uk</a>
<a class="moz-txt-link-rfc2396E" href="mailto:phill@theactivitypeople.co.uk">&lt;mailto:phill@theactivitypeople.co.uk&gt;</a>
    <br>
    <br>
------------------------------------------------------------------------
    <br>
    <br>
*Policies*
    <br>
    <br>
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.
    <br>
    <br>
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.
    <br>
    <br>
------------------------------------------------------------------------
    <br>
  </blockquote>
  <br>
  <br>
  <br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<div
 style="font-family: sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 12px; line-height: 1.1; font-size-adjust: none; font-stretch: normal; width: 300px; color: rgb(51, 51, 51);">
<p><strong>Phillip B Oldham</strong><br>
The Activity People<br>
<a href="mailto:phill@theactivitypeople.co.uk">phill@theactivitypeople.co.uk</a></p>
<hr size="1">
<p style="font-size: 90%;"><strong>Policies</strong></p>
<p style="font-size: 90%;">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.</p>
<p style="font-size: 90%;">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.</p>
<hr size="1">
</div>
</div>
</body>
</html>