Bug 52695 - mod_fcgid 2.3.7-dev crashes under heavy load
Summary: mod_fcgid 2.3.7-dev crashes under heavy load
Status: RESOLVED DUPLICATE of bug 49902
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_fcgid (show other bugs)
Version: 2.2.21
Hardware: PC Linux
: P2 blocker (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-17 11:03 UTC by Przemyslaw Peron
Modified: 2012-06-22 21:43 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Przemyslaw Peron 2012-02-17 11:03:17 UTC
We're using mod_fcgid with Apache mpm_worker on a fairly busy server with 800+ vhosts. Under heavy load mod_fcgid stops working and only restart fixes the problem.

In error_log we have:

--- CUT ---
[Thu Feb 16 02:00:36 2012] [info] mod_fcgid: /fcgi/aaaa/public_html/php-fcgi total process count 700 >= 700, skip the spawn request
[Thu Feb 16 02:00:36 2012] [info] mod_fcgid: /fcgi/bbbb/public_html/php-fcgi total process count 700 >= 700, skip the spawn request
[Thu Feb 16 02:00:36 2012] [info] mod_fcgid: /fcgi/bbbb/public_html/php-fcgi total process count 700 >= 700, skip the spawn request
[Thu Feb 16 02:00:36 2012] [info] mod_fcgid: /fcgi/cccc/public_html/php-fcgi total process count 700 >= 700, skip the spawn request
[Thu Feb 16 02:00:36 2012] [info] mod_fcgid: /fcgi/dddd/public_html/php-fcgi total process count 700 >= 700, skip the spawn request
[Thu Feb 16 02:00:36 2012] [info] mod_fcgid: /fcgi/eeee/public_html/php-fcgi total process count 700 >= 700, skip the spawn request
--- CUT ---

BUT 'ps aux' shows no php-cgi processes running and Apache status page shows 0 FastCGI processes running:

--- CUT ---
                       Apache Server Status for 127.0.0.1
   
   Server Version: Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8o
          DAV/2 Apache mod_fcgid/2.3.7-dev
                               
   Server Built: Dec 13 2011 09:36:32
     __________________________________________________________________
   
   Current Time: Friday, 17-Feb-2012 01:25:42 CET
   Restart Time: Friday, 17-Feb-2012 00:49:48 CET
   Parent Server Generation: 1
   Server uptime: 35 minutes 54 seconds
   Total accesses: 20738 - Total Traffic: 320.9 MB
   CPU Usage: u121.26 s2.07 cu0 cs0 - 5.73% CPU load
   9.63 requests/sec - 152.5 kB/second - 15.8 kB/request
   164 requests currently being processed, 136 idle workers
    
WWWWWWWWWWWW_WWWWWWWWWWW__W_W__WWWWWWWWWWW_W_WWWWW_WWWWWW_W_W_WW
WWWW_WWWWW_WWWWWWWWWWWWWWWWWW_WWWW_W_______________W__W__W_WW_WW
WW__WW_WW_W_WW_WWWW__W_WWWWW___WW_____WW_W_W___WW_______WWW_WW__
W_____W_W_________WW_W__W_W_WWWW_WW_W_W_WW__W_____W___WW___WW_WW
__WW__W_W_W_WW____W___W___WWW________W_W___WWWWW..WW.W....W..WWW
..W...W....WWW...W.WWW..W..WW.WWW.WW.W.....W..WW.W..W.WWWW.WWW..
.W....W.WW.W..W.................................................
................................................................
................................................................
................................................................
................................................................
................................................................
................................................................

[...]

mod_fcgid status:

Total FastCGI processes: 0

--- CUT ---


mod_fcgid configuration:
--- CUT ---
<IfModule mod_fcgid.c>
FcgidProcessTableFile  /var/run/fcgid_shm
FcgidIPCDir /var/run/fastcgi/sock
FcgidIdleTimeout 10
FcgidIdleScanInterval 10
FcgidFixPathinfo 0
FcgidErrorScanInterval 3
FcgidZombieScanInterval 3
FcgidMaxProcesses 700
FcgidMaxRequestsPerProcess 500
FcgidMaxProcessesPerClass 600
FcgidMinProcessesPerClass 5
FcgidConnectTimeout 5
FcgidProcessLifeTime 3600
FcgidIOTimeout 60
FcgidPassHeader Authorization
FcgidMaxRequestInMem 65355000
FcgidMaxRequestLen 65355000
FcgidOutputBufferSize 2048000
</IfModule>
--- CUT ---

Every vhost has similar config:
--- CUT ---
<IfModule mod_fcgid.c>
FcgidMaxProcessesPerClass 6
FcgidMinProcessesPerClass 0
</IfModule>
--- CUT ---

mpm_worker config:
--- CUT ---
<IfModule mpm_worker_module>
    StartServers           4
    ServerLimit          400
    MinSpareThreads       50
    MaxSpareThreads      200
    ThreadLimit           100
    ThreadsPerChild       100
    MaxClients           400
    MaxRequestsPerChild   1000
    ListenBackLog        810
</IfModule>
--- CUT ---
Comment 1 Michał Grzędzicki 2012-02-19 22:27:32 UTC
does this happen after a restart ?

can You post logs from the restart time (17-Feb-2012 00:49:48) ?
Comment 2 William A. Rowe Jr. 2012-02-20 03:57:58 UTC
You mention a crash.  Crashes are diagnosed by evaluating the backtrace that
can be reported from their core file.  I don't see that attached, please provide.
Comment 3 William A. Rowe Jr. 2012-02-29 18:33:41 UTC
Please also try the current trunk?  This sounds a bit like bug 49902 already
fixed... let's see what happens with the state of mod_fcgid now.
Comment 4 William A. Rowe Jr. 2012-06-22 21:43:02 UTC
No response from submittor, presuming the indicated ticket was the root cause.

*** This bug has been marked as a duplicate of bug 49902 ***