LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 11-09-2010, 08:42 AM   #1
RattleSn@ke
Member
 
Registered: Oct 2007
Location: Netherlands, ZH
Posts: 32

Rep: Reputation: 15
Angry Apache2, PHP5.3, suexec and mod_fcgid: processes stay forever


Hello all,

I have an issue with our mod_fcgid setup.
I installed the following versions:

Code:
# pkg_info |grep -i "apache\|php\|fcgi"
ap22-mod_fcgid-2.3.5 An alternative FastCGI module for Apache2
apache-2.2.16       Version 2.2.x of Apache web server with prefork MPM.
php5-5.3.3_1        PHP Scripting Language
Code:
# suexec -V
 -D AP_DOC_ROOT="/usr/home"
 -D AP_GID_MIN=1000
 -D AP_HTTPD_USER="www"
 -D AP_LOG_EXEC="/var/log/httpd-suexec.log"
 -D AP_SAFE_PATH="/usr/local/bin:/usr/local/bin:/usr/bin:/bin"
 -D AP_UID_MIN=1000
 -D AP_USERDIR_SUFFIX="public_html"
Then I added the following config items to httpd.conf:

Code:
LoadModule fcgid_module libexec/apache22/mod_fcgid.so

  <IfModule mod_fcgid.c>
    AddHandler fcgid-script .fcgi
    AddHandler fcgid-script .php

        # Communication timeout: Default value is 20 seconds
        FcgidConnectTimeout 60
    
    FcgidIdleTimeout 300
    FcgidProcessLifeTime 3600

    FcgidMaxRequestsPerProcess 10000

  </IfModule>
and

Code:
# Default settings for virtualhosts
<Directory /home/*/public_html>
        Allow from all
        AllowOverride AuthConfig FileInfo Indexes Limit
        Options +ExecCGI +Includes
        AllowOverride All
</Directory>
Then, I create the needed home directories and create the VHost:

Code:
<VirtualHost *:80>
DocumentRoot "/home/domain1/public_html"
ServerName domain1.com

SuexecUserGroup domain1com domain1com

<Directory "/home/domain1/public_html">
allow from all
Options +Indexes

  FCGIWrapper /home/domain1/etc/php.sh .php
  Options ExecCGI

</Directory>
</VirtualHost>
The contents of the wrapper is:

Code:
#!/bin/sh

PHPRC=.
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=500
export PHP_FCGI_MAX_REQUESTS

exec /usr/local/bin/php-cgi
Everything works, PHP scripts are parsed and the php-cgi exec is executed as the configured user. But the main issue I'm facing now is that the 'old' process are not killed but stay forever! Even when new processes are fired off, the old ones still stay.

So the above config wil first spawn 5 php-cgi processes:
Code:
# ps auxww|grep domain1com|grep php
domain1com 54715  0.0  0.7 95092 13832  ??  Is    3:23PM   0:00.07 /usr/local/bin/php-cgi
domain1com 54716  0.0  0.8 99188 17340  ??  I     3:23PM   0:00.04 /usr/local/bin/php-cgi
domain1com 54717  0.0  0.9 99188 18140  ??  I     3:23PM   0:01.11 /usr/local/bin/php-cgi
domain1com 54718  0.0  0.7 95092 13840  ??  I     3:23PM   0:00.00 /usr/local/bin/php-cgi
domain1com 54719  0.0  0.7 95092 13840  ??  I     3:23PM   0:00.00 /usr/local/bin/php-cgi
Then, after generating 500 requests, 5 new ones are spawned, without killing the old ones:
Code:
# ps auxww|grep domain1com|grep php
domain1com 54715  0.0  0.7 95092 13832  ??  Is    3:23PM   0:00.07 /usr/local/bin/php-cgi
domain1com 54716  0.0  0.8 99188 17340  ??  I     3:23PM   0:00.04 /usr/local/bin/php-cgi
domain1com 54717  0.0  0.9 99188 18140  ??  I     3:23PM   0:01.11 /usr/local/bin/php-cgi
domain1com 54718  0.0  0.7 95092 13840  ??  I     3:23PM   0:00.00 /usr/local/bin/php-cgi
domain1com 54719  0.0  0.7 95092 13840  ??  I     3:23PM   0:00.00 /usr/local/bin/php-cgi
domain1com 54741  0.0  0.7 95092 13832  ??  Is    3:24PM   0:00.07 /usr/local/bin/php-cgi
domain1com 54742  0.0  0.8 99188 16140  ??  I     3:24PM   0:00.03 /usr/local/bin/php-cgi
domain1com 54743  0.0  0.8 99188 17032  ??  I     3:24PM   0:00.21 /usr/local/bin/php-cgi
domain1com 54744  0.0  0.7 95092 13840  ??  I     3:24PM   0:00.00 /usr/local/bin/php-cgi
domain1com 54745  0.0  0.7 95092 13840  ??  I     3:24PM   0:00.00 /usr/local/bin/php-cgi
Anyone any ideas on how to fix this?? It's already taking me two weeks to fix.

Thank you very much.

Kind regards,
Onno.
 
Old 11-10-2010, 05:46 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Looks like it's by design:

Quote:
Any program assigned to the handler fcgid-script is processed using the FastCGI protocol; mod_fcgid starts a sufficient number instances of the program to handle concurrent requests, and these programs remain running to handle further incoming requests. This is significantly faster than using the default mod_cgi or mod_cgid modules to launch the program upon each request. However, the programs invoked by mod_fcgid continue to consume resources, so the administrator must weigh the impact of invoking a particular program once per request against the resources required to leave a sufficient number of instances running continuously.
Ref: http://httpd.apache.org/mod_fcgid/

hth
 
Old 11-12-2010, 03:12 AM   #3
RattleSn@ke
Member
 
Registered: Oct 2007
Location: Netherlands, ZH
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by kbp View Post
Looks like it's by design:



Ref: http://httpd.apache.org/mod_fcgid/

hth
Dear Kpb,

Thank you for your reply. I did find something similar but I misread it.
The main issue now, is that it keeps spawning processes and older ones are not killed. Below you'll find the processlist since my first post. As you see, there are even processes from Sunday.

Code:
# ps auxww|grep php
userl       21200  0.1  0.8 99188 16484  ??  S     7:31PM   0:03.55 /usr/local/bin/php-cgi
haptonomie   2178  0.0  0.6 95092 13460  ??  Is   Wed08AM   0:00.07 /usr/local/bin/php-cgi
haptonomie   2181  0.0  0.6 95092 13468  ??  I    Wed08AM   0:00.00 /usr/local/bin/php-cgi
haptonomie   2182  0.0  0.6 95092 13468  ??  I    Wed08AM   0:00.00 /usr/local/bin/php-cgi
punt             3835  0.0  0.7 99188 14112  ??  I    Sun04PM   0:00.02 /usr/local/bin/php-cgi
punt             3836  0.0  0.7 99188 15344  ??  I    Sun04PM   0:00.31 /usr/local/bin/php-cgi
punt             3837  0.0  0.6 95092 13200  ??  I    Sun04PM   0:00.00 /usr/local/bin/php-cgi
punt             3838  0.0  0.6 95092 13200  ??  I    Sun04PM   0:00.00 /usr/local/bin/php-cgi
punt             4028  0.0  0.8 99188 16744  ??  I    Sun04PM   0:01.24 /usr/local/bin/php-cgi
punt             4029  0.0  0.8 99188 16552  ??  I    Sun04PM   0:00.82 /usr/local/bin/php-cgi
punt             4030  0.0  0.6 95092 13200  ??  I    Sun04PM   0:00.00 /usr/local/bin/php-cgi
punt             4031  0.0  0.6 95092 13200  ??  I    Sun04PM   0:00.00 /usr/local/bin/php-cgi
trendsand  4970  0.0  0.6 95092 13460  ??  Is   Wed08AM   0:00.07 /usr/local/bin/php-cgi
trendsand  4971  0.0  0.7 99188 14916  ??  I    Wed08AM   0:00.03 /usr/local/bin/php-cgi
trendsand  4973  0.0  0.9 99188 17824  ??  I    Wed08AM   0:01.03 /usr/local/bin/php-cgi
trendsand  4974  0.0  0.6 95092 13468  ??  I    Wed08AM   0:00.00 /usr/local/bin/php-cgi
punt             5038  0.0  0.6 95092 13460  ??  Is   Wed08AM   0:00.07 /usr/local/bin/php-cgi
punt             5039  0.0  0.7 99188 14568  ??  I    Wed08AM   0:00.03 /usr/local/bin/php-cgi
punt             5040  0.0  0.7 99188 14512  ??  I    Wed08AM   0:00.02 /usr/local/bin/php-cgi
punt             5041  0.0  0.6 95092 13468  ??  I    Wed08AM   0:00.00 /usr/local/bin/php-cgi
punt             5042  0.0  0.6 95092 13468  ??  I    Wed08AM   0:00.00 /usr/local/bin/php-cgi
ambulance        6193  0.0  0.7 97140 13532  ??  I    Sun07PM   0:00.02 /usr/local/bin/php-cgi
ambulance        6194  0.0  0.7 99188 14628  ??  I    Sun07PM   0:00.07 /usr/local/bin/php-cgi
ambulance        6195  0.0  0.6 95092 13200  ??  I    Sun07PM   0:00.00 /usr/local/bin/php-cgi
ambulance        6196  0.0  0.6 95092 13200  ??  I    Sun07PM   0:00.00 /usr/local/bin/php-cgi
ambulance        6926  0.0  0.6 95092 13460  ??  Is   Wed09AM   0:00.07 /usr/local/bin/php-cgi
ambulance        6927  0.0  0.7 99188 14264  ??  I    Wed09AM   0:00.04 /usr/local/bin/php-cgi
ambulance        6928  0.0  0.8 99188 16352  ??  I    Wed09AM   0:10.68 /usr/local/bin/php-cgi
ambulance        6930  0.0  0.9 99188 17872  ??  I    Wed09AM   0:09.75 /usr/local/bin/php-cgi
ambulance        9075  0.0  0.9 99188 17840  ??  I    Thu09AM   0:03.94 /usr/local/bin/php-cgi
phpmyadmin      10110  0.0  0.6 95092 13460  ??  Is   Wed09AM   0:00.07 /usr/local/bin/php-cgi
phpmyadmin      10111  0.0  0.7 99188 15228  ??  I    Wed09AM   0:00.05 /usr/local/bin/php-cgi
phpmyadmin      10112  0.0  0.7 97140 14248  ??  I    Wed09AM   0:00.04 /usr/local/bin/php-cgi
phpmyadmin      10113  0.0  0.9 99188 17744  ??  I    Wed09AM   0:12.79 /usr/local/bin/php-cgi
phpmyadmin      10114  0.0  0.6 95092 13468  ??  I    Wed09AM   0:00.00 /usr/local/bin/php-cgi
userl       11448  0.0  0.6 95092 13468  ??  Is   12:10PM   0:00.08 /usr/local/bin/php-cgi
userl       11449  0.0  0.7 99188 14896  ??  I    12:10PM   0:00.03 /usr/local/bin/php-cgi
userl       11451  0.0  0.8 99188 17296  ??  I    12:10PM   0:02.69 /usr/local/bin/php-cgi
userl       11452  0.0  0.6 95092 13476  ??  I    12:10PM   0:00.00 /usr/local/bin/php-cgi
trendsand 13036  0.0  0.8 99188 16660  ??  I     1:29PM   0:06.92 /usr/local/bin/php-cgi
userl       13232  0.0  0.6 95092 13468  ??  Is    1:44PM   0:00.07 /usr/local/bin/php-cgi
userl       13233  0.0  0.7 97140 14512  ??  I     1:44PM   0:00.02 /usr/local/bin/php-cgi
userl       13235  0.0  0.6 95092 13476  ??  I     1:44PM   0:00.00 /usr/local/bin/php-cgi
userl       13236  0.0  0.6 95092 13476  ??  I     1:44PM   0:00.00 /usr/local/bin/php-cgi
haptonomie  13247  0.0  0.8 99188 17520  ??  I     1:45PM   0:05.20 /usr/local/bin/php-cgi
broodjeaap   13279  0.0  0.8 99188 17096  ??  I     1:48PM   0:01.92 /usr/local/bin/php-cgi
ontwikkeling    13438  0.0  0.6 95092 13468  ??  Is    1:54PM   0:00.08 /usr/local/bin/php-cgi
ontwikkeling    13439  0.0  0.7 99188 14572  ??  I     1:54PM   0:00.03 /usr/local/bin/php-cgi
ontwikkeling    13440  0.0  0.8 99188 16376  ??  I     1:54PM   0:03.47 /usr/local/bin/php-cgi
ontwikkeling    13442  0.0  0.6 95092 13476  ??  I     1:54PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    13463  0.0  0.6 95092 13468  ??  Is    1:55PM   0:00.08 /usr/local/bin/php-cgi
ontwikkeling    13464  0.0  0.7 99188 14556  ??  I     1:55PM   0:00.03 /usr/local/bin/php-cgi
ontwikkeling    13467  0.0  0.6 95092 13476  ??  I     1:55PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    14790  0.0  0.6 95092 13468  ??  Is    2:06PM   0:00.08 /usr/local/bin/php-cgi
ontwikkeling    14791  0.0  0.7 97140 14016  ??  I     2:06PM   0:00.03 /usr/local/bin/php-cgi
ontwikkeling    14793  0.0  0.6 95092 13476  ??  I     2:06PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    14794  0.0  0.6 95092 13476  ??  I     2:06PM   0:00.00 /usr/local/bin/php-cgi
userl       16624  0.0  0.8 99188 17080  ??  I     2:24PM   0:01.81 /usr/local/bin/php-cgi
ontwikkeling    17011  0.0  0.9 99188 18124  ??  I     2:56PM   0:01.33 /usr/local/bin/php-cgi
punt            17552  0.0  0.6 95092 13468  ??  Is    3:30PM   0:00.07 /usr/local/bin/php-cgi
punt            17553  0.0  0.7 99188 14520  ??  I     3:30PM   0:00.02 /usr/local/bin/php-cgi
punt            17554  0.0  0.6 95092 13476  ??  I     3:30PM   0:00.00 /usr/local/bin/php-cgi
punt            17555  0.0  0.6 95092 13476  ??  I     3:30PM   0:00.00 /usr/local/bin/php-cgi
punt            17556  0.0  0.6 95092 13476  ??  I     3:30PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    18820  0.0  0.8 99188 17596  ??  I     4:51PM   0:00.92 /usr/local/bin/php-cgi
ontwikkeling    19230  0.0  0.8 99188 16476  ??  S     5:14PM   0:00.35 /usr/local/bin/php-cgi
trendsand 19455  0.0  0.8 99188 17564  ??  I     5:34PM   0:05.12 /usr/local/bin/php-cgi
trendsand 19884  0.0  0.6 95092 13468  ??  Is    6:04PM   0:00.07 /usr/local/bin/php-cgi
trendsand 19885  0.0  0.7 97140 14520  ??  I     6:04PM   0:00.02 /usr/local/bin/php-cgi
trendsand 19886  0.0  0.8 99188 16572  ??  I     6:04PM   0:00.33 /usr/local/bin/php-cgi
trendsand 19887  0.0  0.6 95092 13476  ??  I     6:04PM   0:00.00 /usr/local/bin/php-cgi
trendsand 19888  0.0  0.6 95092 13476  ??  I     6:04PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    19995  0.0  0.8 99188 17648  ??  I     6:18PM   0:00.38 /usr/local/bin/php-cgi
punt            20074  0.0  0.7 99188 14244  ??  I    Mon10AM   0:00.02 /usr/local/bin/php-cgi
punt            20075  0.0  0.7 99188 14212  ??  I    Mon10AM   0:00.02 /usr/local/bin/php-cgi
punt            20076  0.0  0.7 99188 15600  ??  I    Mon10AM   0:00.21 /usr/local/bin/php-cgi
punt            20077  0.0  0.6 95092 13268  ??  I    Mon10AM   0:00.00 /usr/local/bin/php-cgi
punt            21251  0.0  0.7 97140 14504  ??  I    Mon11AM   0:00.02 /usr/local/bin/php-cgi
punt            21252  0.0  0.6 95092 13312  ??  I    Mon11AM   0:00.00 /usr/local/bin/php-cgi
punt            21253  0.0  0.6 95092 13312  ??  I    Mon11AM   0:00.00 /usr/local/bin/php-cgi
punt            21254  0.0  0.6 95092 13312  ??  I    Mon11AM   0:00.00 /usr/local/bin/php-cgi
haptonomie  21334  0.0  0.7 99188 14324  ??  I    Mon11AM   0:00.03 /usr/local/bin/php-cgi
haptonomie  21335  0.0  0.7 99188 14260  ??  I    Mon11AM   0:00.03 /usr/local/bin/php-cgi
haptonomie  21336  0.0  0.6 95092 13312  ??  I    Mon11AM   0:00.00 /usr/local/bin/php-cgi
haptonomie  21337  0.0  0.6 95092 13312  ??  I    Mon11AM   0:00.00 /usr/local/bin/php-cgi
test_webshop    22116  0.0  0.6 95092 13468  ??  Is    8:47PM   0:00.11 /usr/local/bin/php-cgi
test_webshop    22117  0.0  0.7 99188 14900  ??  I     8:47PM   0:00.03 /usr/local/bin/php-cgi
test_webshop    22118  0.0  0.8 99188 17656  ??  I     8:47PM   0:00.37 /usr/local/bin/php-cgi
test_webshop    22119  0.0  0.6 95092 13476  ??  I     8:47PM   0:00.00 /usr/local/bin/php-cgi
test_webshop    22120  0.0  0.6 95092 13476  ??  I     8:47PM   0:00.00 /usr/local/bin/php-cgi
ambulance       22630  0.0  0.9 99188 17840  ??  I     9:19PM   0:01.73 /usr/local/bin/php-cgi
haptonomie  22940  0.0  0.8 99188 17452  ??  I     9:41PM   0:02.57 /usr/local/bin/php-cgi
ambulance       23822  0.0  0.9 99188 18200  ??  I    10:30PM   0:01.14 /usr/local/bin/php-cgi
phpmyadmin      24017  0.0  0.7 99188 14300  ??  I    Fri12PM   0:00.09 /usr/local/bin/php-cgi
phpmyadmin      24018  0.0  0.7 97140 13792  ??  I    Fri12PM   0:00.04 /usr/local/bin/php-cgi
phpmyadmin      24019  0.0  0.8 99188 17436  ??  I    Fri12PM   0:03.79 /usr/local/bin/php-cgi
phpmyadmin      24020  0.0  0.6 95092 13200  ??  I    Fri12PM   0:00.00 /usr/local/bin/php-cgi
trendsand 24301  0.0  0.8 99188 17408  ??  I    11:08PM   0:01.74 /usr/local/bin/php-cgi
punt            27788  0.0  0.7 97140 14108  ??  I    Fri02PM   0:00.35 /usr/local/bin/php-cgi
punt            27789  0.0  0.6 95092 13200  ??  I    Fri02PM   0:00.00 /usr/local/bin/php-cgi
punt            27790  0.0  0.6 95092 13200  ??  I    Fri02PM   0:00.00 /usr/local/bin/php-cgi
punt            27791  0.0  0.6 95092 13200  ??  I    Fri02PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    29828  0.0  0.7 97140 13612  ??  I    Fri03PM   0:00.02 /usr/local/bin/php-cgi
ontwikkeling    29829  0.0  0.8 99188 17268  ??  I    Fri03PM   0:02.13 /usr/local/bin/php-cgi
ontwikkeling    29830  0.0  0.6 95092 13200  ??  I    Fri03PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    29831  0.0  0.6 95092 13200  ??  I    Fri03PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    29832  0.0  0.8 99188 17524  ??  I    Fri03PM   0:02.77 /usr/local/bin/php-cgi
ontwikkeling    29833  0.0  0.6 95092 13200  ??  I    Fri03PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    29834  0.0  0.6 95092 13200  ??  I    Fri03PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    29835  0.0  0.6 95092 13200  ??  I    Fri03PM   0:00.00 /usr/local/bin/php-cgi
haptonomie  33831  0.0  0.8 99188 16580  ??  I     8:59AM   0:01.45 /usr/local/bin/php-cgi
punt            44332  0.0  0.7 97140 14388  ??  I     2Nov10   0:00.02 /usr/local/bin/php-cgi
punt            44333  0.0  0.8 99188 16240  ??  I     2Nov10   0:01.51 /usr/local/bin/php-cgi
punt            44334  0.0  0.6 95092 13200  ??  I     2Nov10   0:00.00 /usr/local/bin/php-cgi
punt            44335  0.0  0.6 95092 13200  ??  I     2Nov10   0:00.00 /usr/local/bin/php-cgi
punt            44980  0.0  0.7 97140 14392  ??  I    Fri07PM   0:00.02 /usr/local/bin/php-cgi
punt            44981  0.0  0.7 97140 14420  ??  I    Fri07PM   0:00.04 /usr/local/bin/php-cgi
punt            44982  0.0  0.6 95092 13200  ??  I    Fri07PM   0:00.00 /usr/local/bin/php-cgi
punt            44983  0.0  0.6 95092 13200  ??  I    Fri07PM   0:00.00 /usr/local/bin/php-cgi
trendsand 50115  0.0  0.7 97140 15548  ??  I    Wed04PM   0:00.07 /usr/local/bin/php-cgi
phpmyadmin      51035  0.0  0.7 99188 14972  ??  I    Tue12PM   0:00.07 /usr/local/bin/php-cgi
phpmyadmin      51036  0.0  0.8 99188 17564  ??  I    Tue12PM   0:02.51 /usr/local/bin/php-cgi
userl       51037  0.0  0.6 95092 13460  ??  Is   Wed04PM   0:00.07 /usr/local/bin/php-cgi
userl       51038  0.0  0.7 97140 14536  ??  I    Wed04PM   0:00.02 /usr/local/bin/php-cgi
phpmyadmin      51039  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
phpmyadmin      51040  0.0  0.8 99188 17568  ??  I    Tue12PM   0:03.49 /usr/local/bin/php-cgi
userl       51041  0.0  0.8 99188 17288  ??  I    Wed04PM   0:02.27 /usr/local/bin/php-cgi
userl       51042  0.0  0.8 99188 17016  ??  I    Wed04PM   0:01.75 /usr/local/bin/php-cgi
phpmyadmin      51043  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
phpmyadmin      51044  0.0  0.7 99188 14908  ??  I    Tue12PM   0:00.08 /usr/local/bin/php-cgi
phpmyadmin      51045  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
phpmyadmin      51046  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
userl       51047  0.0  0.6 95092 13468  ??  I    Wed04PM   0:00.00 /usr/local/bin/php-cgi
punt            51066  0.0  0.8 99188 16408  ??  I    Tue12PM   0:01.87 /usr/local/bin/php-cgi
punt            51067  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
punt            51068  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
punt            51069  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
punt            51081  0.0  0.7 97140 13632  ??  I    Tue12PM   0:00.01 /usr/local/bin/php-cgi
punt            51082  0.0  0.8 99188 16596  ??  I    Tue12PM   0:01.46 /usr/local/bin/php-cgi
punt            51083  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
punt            51084  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
ambulance       51150  0.0  0.7 99188 14328  ??  I    Tue12PM   0:00.03 /usr/local/bin/php-cgi
ambulance       51151  0.0  0.8 99188 17612  ??  I    Tue12PM   0:07.54 /usr/local/bin/php-cgi
ambulance       51152  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
ambulance       51153  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
jungadvies   51822  0.0  0.7 99188 14324  ??  I    Tue12PM   0:00.03 /usr/local/bin/php-cgi
jungadvies   51823  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
jungadvies   51824  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
jungadvies   51825  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
punt            51920  0.0  0.7 99188 14300  ??  I    Tue12PM   0:00.03 /usr/local/bin/php-cgi
punt            51921  0.0  0.7 99188 15564  ??  I    Tue12PM   0:00.04 /usr/local/bin/php-cgi
punt            51922  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
punt            51923  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
guusmartens  52019  0.0  0.7 97140 14044  ??  I    Tue12PM   0:00.01 /usr/local/bin/php-cgi
guusmartens  52020  0.0  0.8 99188 17664  ??  I    Tue12PM   0:05.20 /usr/local/bin/php-cgi
guusmartens  52021  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
guusmartens  52022  0.0  0.6 95092 13320  ??  I    Tue12PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    52492  0.0  0.7 99188 14736  ??  I    Tue01PM   0:00.03 /usr/local/bin/php-cgi
ontwikkeling    52493  0.0  0.8 99188 16140  ??  I    Tue01PM   0:00.07 /usr/local/bin/php-cgi
ontwikkeling    52494  0.0  0.6 95092 13320  ??  I    Tue01PM   0:00.00 /usr/local/bin/php-cgi
ontwikkeling    52495  0.0  0.6 95092 13320  ??  I    Tue01PM   0:00.00 /usr/local/bin/php-cgi
ambulance       53164  0.0  0.7 99188 14384  ??  I    Fri08PM   0:00.04 /usr/local/bin/php-cgi
ambulance       53165  0.0  0.8 99188 17272  ??  I    Fri08PM   0:12.32 /usr/local/bin/php-cgi
ambulance       53166  0.0  0.6 95092 13200  ??  I    Fri08PM   0:00.00 /usr/local/bin/php-cgi
ambulance       53167  0.0  0.6 95092 13200  ??  I    Fri08PM   0:00.00 /usr/local/bin/php-cgi
ambulance       53859  0.0  0.7 99188 14824  ??  I    Tue02PM   0:00.04 /usr/local/bin/php-cgi
ambulance       53860  0.0  0.8 99188 17588  ??  I    Tue02PM   0:05.14 /usr/local/bin/php-cgi
ambulance       53861  0.0  0.6 95092 13320  ??  I    Tue02PM   0:00.00 /usr/local/bin/php-cgi
ambulance       53862  0.0  0.6 95092 13320  ??  I    Tue02PM   0:00.00 /usr/local/bin/php-cgi
broodjeaap   53978  0.0  0.7 97140 14852  ??  I    Tue02PM   0:00.06 /usr/local/bin/php-cgi
broodjeaap   53979  0.0  0.8 99188 17080  ??  I    Tue02PM   0:01.20 /usr/local/bin/php-cgi
broodjeaap   53980  0.0  0.6 95092 13320  ??  I    Tue02PM   0:00.00 /usr/local/bin/php-cgi
broodjeaap   53981  0.0  0.6 95092 13320  ??  I    Tue02PM   0:00.00 /usr/local/bin/php-cgi
userl       54493  0.0  0.7 99188 14744  ??  I    Tue03PM   0:00.03 /usr/local/bin/php-cgi
userl       54494  0.0  0.9 99188 18480  ??  I    Tue03PM   0:01.22 /usr/local/bin/php-cgi
userl       54495  0.0  0.8 99188 16224  ??  I    Tue03PM   0:00.30 /usr/local/bin/php-cgi
userl       54496  0.0  0.6 95092 13320  ??  I    Tue03PM   0:00.00 /usr/local/bin/php-cgi
trendsand 54716  0.0  0.7 99188 14616  ??  I    Tue03PM   0:00.04 /usr/local/bin/php-cgi
trendsand 54717  0.0  0.8 99188 17640  ??  I    Tue03PM   0:02.03 /usr/local/bin/php-cgi
trendsand 54718  0.0  0.6 95092 13320  ??  I    Tue03PM   0:00.00 /usr/local/bin/php-cgi
trendsand 54719  0.0  0.6 95092 13320  ??  I    Tue03PM   0:00.00 /usr/local/bin/php-cgi
trendsand 54742  0.0  0.7 99188 14452  ??  I    Tue03PM   0:00.03 /usr/local/bin/php-cgi
trendsand 54743  0.0  0.8 99188 16512  ??  I    Tue03PM   0:00.58 /usr/local/bin/php-cgi
trendsand 54744  0.0  0.6 95092 13320  ??  I    Tue03PM   0:00.00 /usr/local/bin/php-cgi
trendsand 54745  0.0  0.6 95092 13320  ??  I    Tue03PM   0:00.00 /usr/local/bin/php-cgi
trendsand 54784  0.0  0.7 97140 14352  ??  I    Tue03PM   0:00.03 /usr/local/bin/php-cgi
trendsand 54785  0.0  0.7 97140 14352  ??  I    Tue03PM   0:00.02 /usr/local/bin/php-cgi
trendsand 54786  0.0  0.7 97140 15192  ??  I    Tue03PM   0:00.10 /usr/local/bin/php-cgi
trendsand 54787  0.0  0.6 95092 13320  ??  I    Tue03PM   0:00.00 /usr/local/bin/php-cgi
trendsand 55998  0.0  0.7 99188 14900  ??  I    Tue04PM   0:00.03 /usr/local/bin/php-cgi
trendsand 55999  0.0  0.8 99188 16552  ??  I    Tue04PM   0:00.19 /usr/local/bin/php-cgi
trendsand 56000  0.0  0.6 95092 13464  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
trendsand 56001  0.0  0.6 95092 13464  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
trendsand 56346  0.0  0.6 95092 13460  ??  Is   Tue04PM   0:00.07 /usr/local/bin/php-cgi
trendsand 56347  0.0  0.7 99188 14600  ??  I    Tue04PM   0:00.03 /usr/local/bin/php-cgi
trendsand 56349  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
trendsand 56350  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
trendsand 56351  0.0  0.6 95092 13460  ??  Is   Tue04PM   0:00.07 /usr/local/bin/php-cgi
trendsand 56352  0.0  0.7 99188 14772  ??  I    Tue04PM   0:00.04 /usr/local/bin/php-cgi
trendsand 56355  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
jungadvies   56436  0.0  0.8 99188 17132  ??  I    Fri10PM   0:00.75 /usr/local/bin/php-cgi
jungadvies   56437  0.0  0.6 95092 13200  ??  I    Fri10PM   0:00.00 /usr/local/bin/php-cgi
jungadvies   56438  0.0  0.6 95092 13200  ??  I    Fri10PM   0:00.00 /usr/local/bin/php-cgi
jungadvies   56439  0.0  0.6 95092 13200  ??  I    Fri10PM   0:00.00 /usr/local/bin/php-cgi
punt            56480  0.0  0.6 95092 13460  ??  Is   Tue04PM   0:00.07 /usr/local/bin/php-cgi
punt            56481  0.0  0.7 99188 14576  ??  I    Tue04PM   0:00.03 /usr/local/bin/php-cgi
punt            56482  0.0  0.8 99188 15856  ??  I    Tue04PM   0:00.34 /usr/local/bin/php-cgi
punt            56483  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
punt            56484  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
broodjeaap   56485  0.0  0.6 95092 13460  ??  Is   Tue04PM   0:00.07 /usr/local/bin/php-cgi
broodjeaap   56486  0.0  0.7 99188 14204  ??  I    Tue04PM   0:00.03 /usr/local/bin/php-cgi
broodjeaap   56488  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
broodjeaap   56489  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
ambulance       56598  0.0  0.6 95092 13460  ??  Is   Tue04PM   0:00.07 /usr/local/bin/php-cgi
ambulance       56599  0.0  0.7 99188 15468  ??  I    Tue04PM   0:05.97 /usr/local/bin/php-cgi
ambulance       56602  0.0  0.9 99188 17748  ??  I    Tue04PM   0:06.93 /usr/local/bin/php-cgi
haptonomie  56607  0.0  0.6 95092 13460  ??  Is   Tue04PM   0:00.08 /usr/local/bin/php-cgi
haptonomie  56608  0.0  0.7 99188 14592  ??  I    Tue04PM   0:00.03 /usr/local/bin/php-cgi
haptonomie  56610  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
haptonomie  56611  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
guusmartens  56795  0.0  0.6 95092 13460  ??  Is   Tue04PM   0:00.07 /usr/local/bin/php-cgi
guusmartens  56796  0.0  0.7 97140 13944  ??  I    Tue04PM   0:00.02 /usr/local/bin/php-cgi
guusmartens  56797  0.0  0.7 97140 15016  ??  I    Tue04PM   0:00.24 /usr/local/bin/php-cgi
guusmartens  56798  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
guusmartens  56799  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
trendsand 56831  0.0  0.6 95092 13460  ??  Is   Tue04PM   0:00.07 /usr/local/bin/php-cgi
trendsand 56832  0.0  0.7 97140 14028  ??  I    Tue04PM   0:00.02 /usr/local/bin/php-cgi
trendsand 56833  0.0  0.7 97140 15424  ??  I    Tue04PM   0:01.31 /usr/local/bin/php-cgi
trendsand 56834  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
trendsand 56835  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
punt            56903  0.0  0.6 95092 13460  ??  Is   Tue04PM   0:00.07 /usr/local/bin/php-cgi
punt            56904  0.0  0.7 97140 14556  ??  I    Tue04PM   0:00.02 /usr/local/bin/php-cgi
punt            56905  0.0  0.7 97140 15580  ??  I    Tue04PM   0:00.72 /usr/local/bin/php-cgi
punt            56906  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
punt            56907  0.0  0.6 95092 13468  ??  I    Tue04PM   0:00.00 /usr/local/bin/php-cgi
punt            57287  0.0  0.6 95092 13460  ??  Is   Wed06PM   0:00.07 /usr/local/bin/php-cgi
punt            57288  0.0  0.7 99188 14512  ??  I    Wed06PM   0:00.02 /usr/local/bin/php-cgi
punt            57289  0.0  0.8 99188 15620  ??  I    Wed06PM   0:00.06 /usr/local/bin/php-cgi
punt            57290  0.0  0.6 95092 13468  ??  I    Wed06PM   0:00.00 /usr/local/bin/php-cgi
punt            57291  0.0  0.6 95092 13468  ??  I    Wed06PM   0:00.00 /usr/local/bin/php-cgi
userl       57310  0.0  0.6 95092 13460  ??  Is   Wed06PM   0:00.07 /usr/local/bin/php-cgi
userl       57311  0.0  0.8 99188 17092  ??  I    Wed06PM   0:02.73 /usr/local/bin/php-cgi
userl       57312  0.0  0.7 97140 14244  ??  I    Wed06PM   0:00.02 /usr/local/bin/php-cgi
userl       57313  0.0  0.6 95092 13468  ??  I    Wed06PM   0:00.00 /usr/local/bin/php-cgi
userl       57314  0.0  0.6 95092 13468  ??  I    Wed06PM   0:00.00 /usr/local/bin/php-cgi
punt            57386  0.0  0.6 95092 13460  ??  Is   Tue05PM   0:00.07 /usr/local/bin/php-cgi
punt            57387  0.0  0.7 97140 14660  ??  I    Tue05PM   0:00.02 /usr/local/bin/php-cgi
punt            57388  0.0  0.7 97140 14692  ??  I    Tue05PM   0:00.09 /usr/local/bin/php-cgi
punt            57389  0.0  0.6 95092 13468  ??  I    Tue05PM   0:00.00 /usr/local/bin/php-cgi
punt            57390  0.0  0.6 95092 13468  ??  I    Tue05PM   0:00.00 /usr/local/bin/php-cgi
trendsand 58008  0.0  0.6 95092 13460  ??  Is   Tue06PM   0:00.07 /usr/local/bin/php-cgi
trendsand 58009  0.0  0.8 99188 16500  ??  I    Tue06PM   0:00.27 /usr/local/bin/php-cgi
trendsand 58010  0.0  0.6 95092 13468  ??  I    Tue06PM   0:00.00 /usr/local/bin/php-cgi
trendsand 58011  0.0  0.6 95092 13468  ??  I    Tue06PM   0:00.00 /usr/local/bin/php-cgi
trendsand 58012  0.0  0.6 95092 13468  ??  I    Tue06PM   0:00.00 /usr/local/bin/php-cgi
trendsand 58092  0.0  0.6 95092 13460  ??  Is   Tue06PM   0:00.07 /usr/local/bin/php-cgi
trendsand 58093  0.0  0.7 99188 15264  ??  I    Tue06PM   0:00.03 /usr/local/bin/php-cgi
trendsand 58094  0.0  0.8 99188 16864  ??  I    Tue06PM   0:02.25 /usr/local/bin/php-cgi
trendsand 58095  0.0  0.6 95092 13468  ??  I    Tue06PM   0:00.00 /usr/local/bin/php-cgi
trendsand 58096  0.0  0.6 95092 13468  ??  I    Tue06PM   0:00.00 /usr/local/bin/php-cgi
trendsand 58227  0.0  0.6 95092 13460  ??  Is   Tue06PM   0:00.07 /usr/local/bin/php-cgi
trendsand 58228  0.0  0.7 97140 14032  ??  I    Tue06PM   0:00.02 /usr/local/bin/php-cgi
trendsand 58229  0.0  0.7 97140 15296  ??  I    Tue06PM   0:02.06 /usr/local/bin/php-cgi
trendsand 58230  0.0  0.6 95092 13468  ??  I    Tue06PM   0:00.00 /usr/local/bin/php-cgi
trendsand 58231  0.0  0.6 95092 13468  ??  I    Tue06PM   0:00.00 /usr/local/bin/php-cgi
punt            59595  0.0  0.6 95092 13460  ??  Is   Tue08PM   0:00.07 /usr/local/bin/php-cgi
punt            59596  0.0  0.7 97140 14660  ??  I    Tue08PM   0:00.02 /usr/local/bin/php-cgi
punt            59597  0.0  0.7 97140 14688  ??  I    Tue08PM   0:00.03 /usr/local/bin/php-cgi
punt            59598  0.0  0.6 95092 13468  ??  I    Tue08PM   0:00.00 /usr/local/bin/php-cgi
punt            59599  0.0  0.6 95092 13468  ??  I    Tue08PM   0:00.00 /usr/local/bin/php-cgi
trendsand 59931  0.0  0.6 95092 13460  ??  Is   Tue08PM   0:00.07 /usr/local/bin/php-cgi
trendsand 59932  0.0  0.7 97140 14004  ??  I    Tue08PM   0:00.02 /usr/local/bin/php-cgi
trendsand 59933  0.0  0.7 97140 15040  ??  I    Tue08PM   0:00.19 /usr/local/bin/php-cgi
trendsand 59934  0.0  0.6 95092 13468  ??  I    Tue08PM   0:00.00 /usr/local/bin/php-cgi
trendsand 59935  0.0  0.6 95092 13468  ??  I    Tue08PM   0:00.00 /usr/local/bin/php-cgi
trendsand 60990  0.0  0.6 95092 13460  ??  Is   Tue09PM   0:00.07 /usr/local/bin/php-cgi
trendsand 60991  0.0  0.7 97140 13944  ??  I    Tue09PM   0:00.02 /usr/local/bin/php-cgi
trendsand 60992  0.0  0.7 97140 15180  ??  I    Tue09PM   0:00.30 /usr/local/bin/php-cgi
trendsand 60993  0.0  0.6 95092 13468  ??  I    Tue09PM   0:00.00 /usr/local/bin/php-cgi
trendsand 60994  0.0  0.6 95092 13468  ??  I    Tue09PM   0:00.00 /usr/local/bin/php-cgi
jungadvies   70127  0.0  0.6 95092 13460  ??  Is   Wed04AM   0:00.07 /usr/local/bin/php-cgi
jungadvies   70128  0.0  0.7 99188 14600  ??  I    Wed04AM   0:00.03 /usr/local/bin/php-cgi
jungadvies   70129  0.0  0.8 99188 16172  ??  I    Wed04AM   0:00.41 /usr/local/bin/php-cgi
jungadvies   70130  0.0  0.6 95092 13468  ??  I    Wed04AM   0:00.00 /usr/local/bin/php-cgi
jungadvies   70131  0.0  0.6 95092 13468  ??  I    Wed04AM   0:00.00 /usr/local/bin/php-cgi
ambulance       93464  0.0  0.6 95092 13460  ??  Is   Wed07AM   0:00.07 /usr/local/bin/php-cgi
ambulance       93465  0.0  0.7 97140 14840  ??  I    Wed07AM   0:00.02 /usr/local/bin/php-cgi
ambulance       93466  0.0  0.7 99188 15176  ??  I    Wed07AM   0:00.07 /usr/local/bin/php-cgi
ambulance       93467  0.0  0.6 95092 13468  ??  I    Wed07AM   0:00.00 /usr/local/bin/php-cgi
ambulance       93468  0.0  0.6 95092 13468  ??  I    Wed07AM   0:00.00 /usr/local/bin/php-cgi
I don't mind processes that keep running, but if this goes on, the server will deplete it's resources. I can't believe this is how it is supposed to work.

Thanks!
Onno.
 
Old 11-12-2010, 09:57 AM   #4
dougp25
Member
 
Registered: Dec 2003
Location: Seacoast NH
Distribution: PCLinuxOS
Posts: 37

Rep: Reputation: 2
Maybe a bash script that looks for those processes that are older than, say, a week, and then kills them?
You could set it up in cron to fire off each day/week/whatever timeframe you wanted.
You woud of course run the risk that one of those old processes might still be serving something up, but it seems doubtful.
 
Old 11-23-2010, 03:21 AM   #5
RattleSn@ke
Member
 
Registered: Oct 2007
Location: Netherlands, ZH
Posts: 32

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dougp25 View Post
Maybe a bash script that looks for those processes that are older than, say, a week, and then kills them?
You could set it up in cron to fire off each day/week/whatever timeframe you wanted.
You woud of course run the risk that one of those old processes might still be serving something up, but it seems doubtful.
Hi Doug,

I understand. I already have setup a script, but I don't think I'm the only one with this issue? A workaround can always be made, but I always try to find a more definitve solution.

Thanks.
 
Old 11-23-2010, 06:54 PM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
I had a quick read through this guide and it seems thorough, maybe you should let php decide on the number of children to launch rather than forcing it ...

cheers
 
  


Reply

Tags
php5 apache, suexec


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Set Up Apache2 With mod_fcgid And PHP5 On Fedora 13 LXer Syndicated Linux News 0 09-16-2010 01:00 PM
LXer: How To Set Up Apache2 With mod_fcgid And PHP5 On Ubuntu 10.04 LXer Syndicated Linux News 0 09-07-2010 10:10 AM
LXer: How To Set Up Apache2 With mod_fcgid And PHP5 On OpenSUSE 11.3 LXer Syndicated Linux News 0 09-05-2010 04:20 PM
LXer: How To Set Up Apache2 With mod_fcgid And PHP5 On Ubuntu 9.04 LXer Syndicated Linux News 0 10-06-2009 07:41 AM
LXer: How To Set Up Apache2 With mod_fcgid And PHP5 On Ubuntu 8.10 LXer Syndicated Linux News 0 03-09-2009 12:30 PM


All times are GMT -5. The time now is 02:24 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration