Problem with orhpaned fcgi php processes2

Discussion in 'Server Operation' started by maxxer, Jun 24, 2013.

  1. maxxer

    maxxer Member

    Hi.

    We have a webserver with apache 2.2.14, PHP 5.3.2.
    PHP is executed using mod_fcgid (see bottom). Everything works fine but sometimes, and we still have to figure out what triggers this, when php processes are "rotated" they remain active and orphaned: apache spawns new php processes and the old ones remains on the system.
    Killing them doesn't always kicks them away. More likely an "apache2ctl graceful" frees the system from this stale processes.
    We found this in error log:
    from what I found searching around this is quite normal, but that's all I found in apache logs during one of this processes leak.

    This event is luckily seldomly happening, usually apache and php operate normally and with no problems during fcgid childrens renewal.
    How can we understand what's going wrong in these situations?
    thanks

    maxxer

    P.s. posting here some configs:

    mod_fcgid config in site:
    Code:
        <IfModule mod_fcgid.c>
          SuexecUserGroup domain domain
          <Directory /var/www/fomain.it/htdocs/>
            AddHandler fcgid-script .php
            FCGIWrapper /var/www/fcgi/domain.it/fcgi-starter-php .php
            Options +ExecCGI -Indexes
            AllowOverride FileInfo Options
            Order allow,deny
            Allow from all
          </Directory>
          <Directory /var/www/fcgi/domain.it/>
            AllowOverride None
            Options +ExecCGI MultiViews -Indexes
            Order allow,deny
            Allow from all
          </Directory>
        </IfModule>
    /var/www/fcgi/domain.it/fcgi-starter-php:
    Code:
    #!/bin/sh
    
    PHPRC=/var/www/fcgi/domain.it/php/
    
    export PHPRC
    PHP_FCGI_CHILDREN=8
    export PHP_FCGI_CHILDREN
    PHP_FCGI_MAX_REQUESTS=5000
    export PHP_FCGI_MAX_REQUESTS
    
    exec /usr/lib/cgi-bin/php $1
     

Share This Page