Server.php causing 100%CPU usage

Discussion in 'Installation/Configuration' started by ad.shannon, Jun 23, 2015.

  1. ad.shannon

    ad.shannon New Member

    Hi
    I have a server with Centos 6.5 running ISPconfig 3 after following this guide
    https://www.howtoforge.com/perfect-...l-php-pureftpd-postfix-dovecot-and-ispconfig3

    there's an issue with php processes running and taking up 100% cpu, eventually taking up 100% memory too and causing the server to crash.
    if I run htop I see lots of these....
    /usr/bin/php -q /usr/local/ispconfig/server/server.php

    any idea how to check whats causing this?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. ad.shannon

    ad.shannon New Member

    ok, so I turned on "Debug" log levels and got a message saying...
    There is already an instance of server.php running. Exiting.

    Then I follow these steps
    1) Comment out the server.sh cronjob in the root crontab.
    2) Delete the lockfile:
    rm -f /usr/local/ispconfig/server/temp/.ispconfig_lock
    3) run:
    /usr/bin/php -q /usr/local/ispconfig/server/server.php

    And now I'm getting this output...

    # /usr/bin/php -q /usr/local/ispconfig/server/server.php
    23.06.2015-04:44 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    23.06.2015-04:44 - DEBUG - Found 28 changes, starting update process.
    23.06.2015-04:44 - DEBUG - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
    23.06.2015-04:44 - DEBUG - Calling function 'update' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
    PHP Warning: escapeshellcmd() has been disabled for security reasons in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 408
    PHP Warning: escapeshellcmd() has been disabled for security reasons in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 415
    PHP Warning: escapeshellcmd() has been disabled for security reasons in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 418
    PHP Warning: exec() has been disabled for security reasons in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 418
    23.06.2015-04:44 - DEBUG - Adding the user:
    PHP Warning: escapeshellcmd() has been disabled for security reasons in /usr/local/ispconfig/server/lib/classes/system.inc.php on line 1605
    PHP Warning: exec() has been disabled for security reasons in /usr/local/ispconfig/server/lib/classes/system.inc.php on line 1605
    PHP Warning: exec() has been disabled for security reasons in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 559
    PHP Warning: escapeshellarg() has been disabled for security reasons in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 564
    PHP Warning: escapeshellarg() has been disabled for security reasons in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 564
    PHP Warning: exec() has been disabled for security reasons in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 564
    PHP Warning: escapeshellcmd() has been disabled for security reasons in /usr/local/ispconfig/server/lib/classes/system.inc.php on line 1602
    PHP Warning: exec() has been disabled for security reasons in /usr/local/ispconfig/server/lib/classes/system.inc.php on line 1602
    PHP Warning: escapeshellcmd() has been disabled for security reasons in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 611
    PHP Warning: escapeshellcmd() has been disabled for security reasons in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 611
    PHP Warning: touch(): Unable to create file because No such file or directory in /usr/local/ispconfig/server/plugins-available/apache2_plugin.inc.php on line 2909


    and if I run
    # /usr/local/ispconfig/server/server.sh
    I get the first message again...

    23.06.2015-04:49 - DEBUG - There is already an instance of server.php running. Exiting.
     
  4. ad.shannon

    ad.shannon New Member

    I repeated these a few times
    2) Delete the lockfile:
    rm -f /usr/local/ispconfig/server/temp/.ispconfig_lock
    3) run:
    /usr/bin/php -q /usr/local/ispconfig/server/server.php

    and it looks much better now but I'm still left with lots of processes running server.php.
    /usr/bin/php -q /usr/local/ispconfig/server/server.php

    is it safe to kill those off?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, you can jill them manually. the reason for your problem is that you disallowed ispconfig to run commands on your system in php.ini.
     

Share This Page