You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christopher Ecklesdafer <ch...@cloudaccess.net> on 2012/07/27 18:34:40 UTC

[users@httpd] Problems with Mod_fcgid.

I have an issue with mod_fcgid spawning new php processes and after some
time it looses control over php-cgi. I see many php-cgi processes running
for long time. When I check parent process ID I see it is init owning them.
They aren’t zombies though. It means httpd lost control over these
processes. For time being number of process grows to the point my server
goes out of memory. Stopping and starting httpd doesn’t kill them. Only way
to stop php-cgi processes is to send the kill signal directly to the
process.

Here are my wrapper settings:

#!/bin/sh

# Do not change this file

PHPRC=/etc/

export PHPRC

export PHP_FCGI_MAX_REQUESTS=5000

export PHP_FCGI_CHILDREN=0

exec /usr/bin/php-cgi

Here is our mod_fcgid config settings:

       PHP_Fix_Pathinfo_Enable 1

       FcgidProcessTableFile /tmp/fcgidshm_aux7

       FcgidIPCDir /tmp/.fcgidsock_aux7

       FcgidMinProcessesPerClass 0

       FcgidMaxProcessesPerClass 70

       FcgidMaxProcesses 8000

       FcgidMaxRequestLen 1073741824

       FcgidMaxRequestInMem 20971520

       FcgidIdleTimeout 30

       FcgidIdleScanInterval 60

       FcgidBusyTimeout 300

       FcgidBusyScanInterval 120

       FcgidErrorScanInterval 20

       FcgidZombieScanInterval 3

       FcgidProcessLifeTime 60

       FcgidIOTimeout 300



I see this problem on mod_fcgid 2.3.6 with Apache 2.2.3 distributed by
Cloudlinux repository for CentoOS 5 as well as for most recent version of
mod_fcgid 2.3.7 with Apache httpd 2.2.15 for Cent OS 6.2.

Only solution I have so far is script like one shown here:
http://www.sonassi.com/knowledge-base/abandoned-php-fcgi-process-clean-up/

Screenshot showing example of a php-cgi processes that have lost parent
control.
http://quick-markup.com/p/500f1d0461f16

**I have cronjob doing httpd graceful restart each hour. The issue here may
be related to that cronjob. Although I haven’t observed it is caused by
graceful restart. Usually it takes couple of days when I see php-cgi
processes being old.

Is there anything else I should check in my system to eliminate this issue?

--

Re: [users@httpd] Problems with Mod_fcgid.

Posted by Jeff Trawick <tr...@gmail.com>.
On Fri, Jul 27, 2012 at 12:34 PM, Christopher Ecklesdafer
<ch...@cloudaccess.net> wrote:
> I have an issue with mod_fcgid spawning new php processes and after some
> time it looses control over php-cgi. I see many php-cgi processes running
> for long time. When I check parent process ID I see it is init owning them.
> They aren’t zombies though. It means httpd lost control over these
> processes. For time being number of process grows to the point my server
> goes out of memory. Stopping and starting httpd doesn’t kill them. Only way
> to stop php-cgi processes is to send the kill signal directly to the
> process.
>
> Here are my wrapper settings:
>
> #!/bin/sh
> # Do not change this file
> PHPRC=/etc/
> export PHPRC
> export PHP_FCGI_MAX_REQUESTS=5000
> export PHP_FCGI_CHILDREN=0
> exec /usr/bin/php-cgi
>
> Here is our mod_fcgid config settings:
>
>        PHP_Fix_Pathinfo_Enable 1
>        FcgidProcessTableFile /tmp/fcgidshm_aux7
>        FcgidIPCDir /tmp/.fcgidsock_aux7
>        FcgidMinProcessesPerClass 0
>        FcgidMaxProcessesPerClass 70
>        FcgidMaxProcesses 8000
>        FcgidMaxRequestLen 1073741824
>        FcgidMaxRequestInMem 20971520
>        FcgidIdleTimeout 30
>        FcgidIdleScanInterval 60
>        FcgidBusyTimeout 300
>        FcgidBusyScanInterval 120
>        FcgidErrorScanInterval 20
>        FcgidZombieScanInterval 3
>        FcgidProcessLifeTime 60
>        FcgidIOTimeout 300
>
>
> I see this problem on mod_fcgid 2.3.6 with Apache 2.2.3 distributed by
> Cloudlinux repository for CentoOS 5 as well as for most recent version of
> mod_fcgid 2.3.7 with Apache httpd 2.2.15 for Cent OS 6.2.
>
> Only solution I have so far is script like one shown here:
> http://www.sonassi.com/knowledge-base/abandoned-php-fcgi-process-clean-up/
>
> Screenshot showing example of a php-cgi processes that have lost parent
> control.
> http://quick-markup.com/p/500f1d0461f16
>
> **I have cronjob doing httpd graceful restart each hour. The issue here may
> be related to that cronjob. Although I haven’t observed it is caused by
> graceful restart. Usually it takes couple of days when I see php-cgi
> processes being old.

mod_fcgid process management hosed after graceful restart???

https://issues.apache.org/bugzilla/show_bug.cgi?id=48949

>
> Is there anything else I should check in my system to eliminate this issue?
>
> --



-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org