Question

init: php5-fpm main process (3586) terminated with status 78

Posted June 1, 2015 13k views
NginxUbuntuPHP

Hi all,

I just allowed my droplet to update to “the latest version of our cloud” and now I am having issues with Nginx/PHP5-FPM

I get the following error multiple times when I try to start FPM

 init: php5-fpm main process (3586) terminated with status 78

Followed by

 init: php5-fpm respawning too fast, stopped

I’ve not changed anything config wise, and it was working fine after a restart before the droplet upgrade.

Any tips?

1 comment
  • Hopefully this will help someone. I had the same problem - and using the
    “service php5-fpm restart” or “service php5-fpm start” command did not work (returned the status 78 error followed by the “php5-fpm respawning too fast, stopped” notice).

    Solution was to edit the /etc/init.d/php5-fpm file and add a sleep command inside the do_start() function before it closes:

    Function that starts the daemon/service

    dostart()
    {
    # Return
    # 0 if daemon has been started
    # 1 if daemon was already running
    # 2 if daemon could not be started
    start-stop-daemon –start –quiet –pidfile $PIDFILE –exec $DAEMON –test > /dev/null \
    || return 1
    start-stop-daemon –start –quiet –pidfile $PIDFILE –exec $DAEMON – \
    $DAEMON
    ARGS 2>/dev/null \
    || return 2
    # Add code here, if necessary, that waits for the process to be ready
    # to handle requests from services started subsequently which depend
    # on this one. As a last resort, sleep for some time.
    sleep 20
    }

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

What method are you using to start/restart php5-fpm? If you are using the /etc/init.d/php5-fpm script directly this is likely the cause of the issue since php5-fpm utilizes upstart. I’ve found a couple places with additional information and solutions for this issue which can be found below:

Can’t start or stop php-fpm on Ubuntu
Mysterious error with php5-fpm

In the future when starting/stopping/restarting php5-fpm you can use the commands:

service php5-fpm start       #Start the service
service php5-fpm stop       #Stop the service
service php5-fpm restart   # Restart the service

Hi

In my case, we changed de rlimit_files to

rlimit_files = unlimited

and php fails to start. If we change the directive to

;rlimit_files = unlimited

php5-fpm runs ok.

Submit an Answer