ispconfig php-cgi zombie processes

Discussion in 'General' started by Lionheart82, Apr 22, 2015.

  1. Lionheart82

    Lionheart82 Member

    I have noticed on two centos servers that multiple php-cgi processes are kept in memory even though the ispconfig server setting "FastCGI Children" is set to 1 or 2.
    What i see on top are multiple php-cgi processes running with user name "ispconfi".

    Info:
    Http server Apache 2.2
    OS: Centos 5.11
    Isp Config V: ispconfig-3054p5

    One server uses for host:
    ProxyPass / http://127.0.0.1:8080/
    ProxyPassReverse / http://127.0.0.1:8080/
    The other uses no host but a different port... Both have the same issue.

    I have create a bug here:
    http://bugtracker.ispconfig.org/index.php?do=details&task_id=3873
    And also i uploaded a print screen of the top command.

    I manage to keep them under control via a cron job with the command:
    /bin/ps auxwwwf | grep '[0-9] /usr/bin/php' | awk '{ print $2 }' | xargs kill -9
     

    Attached Files:

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Apache starts as many fcgi processes from php as this website has connections. ISPConfig is not involved in starting the fcgi proceses as all, they just run under a user named ispconfig and therefor you see the name ispconfig in the ps output. This behaviour does not happen on a server with the perfect setup, so it is a config issue on your system and not a bug in ispconfig, likely to be caused by you proxy redirect or you have really that many connections on the site that you forwarded with the proxy.
    so first you should remove that proxy and restart apache to see if the problem still persists, then you should check the apache logs to see how many users are accessing the website where you added the proxy and you can add a access.log setting in the ispconfig vhost to see how many accesses get logged there.
     
    Last edited: Apr 23, 2015
  3. Lionheart82

    Lionheart82 Member

    Hello Till and good morning...
    As i said i have the same issue with two servers one as this proxy and the other has no proxy at all.
    If you can please forget about the server with the proxy, the other server has php-fpm on the domain and no proxy at all(any way it is not connected to the ispconfig control panel as a host).
    Apart from the perfect server tutorial i have followed the steps here:
    https://www.howtoforge.com/community/threads/change-port-admin-connecting-ispconfig3.42519/
    in order to change the port to another one and i access in through https://www.domain.com:newport

    Top shows the same ispconfi php-cgi processes
    Do you have anything in mind perhaps?
     
  4. Lionheart82

    Lionheart82 Member

    Update.... I believe i have found the source of the issue.
    On the ispconfig cron job the script /usr/local/ispconfig/server/server.sh calls two php executions and they are obviously not closed properly..
    i am talking about the following:

    cd /usr/local/ispconfig/server
    /usr/bin/php -q /usr/local/ispconfig/server/server.php

    cd /usr/local/ispconfig/security
    /usr/bin/php -q /usr/local/ispconfig/security/check.php

    PS. the server log i placed shows traffic only from myself ... so it is definitely not the control panel that is creating the php zombies.

    On the prompt i can see the procceses with ps auxwwwf | grep '/usr/bin/php-cgi'
    \_ /usr/bin/php-cgi -d magic_quotes_gpc=off -d session.save_path=/usr/local/ispconfig/interface/temp and execution time is like a day ago.
    I am now trying to find how i would fix it ;)
     

Share This Page