Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm having a very difficult case with latest php5-fpm (from debphp) and nginx 1.4.3 on Ubtuntu 12.04LTS.

In short, I cannot start php5-fp at all, I keep getting this error in syslog:

kernel: [1213013.564441] init: php5-fpm main process (7357) terminated with status 78
kernel: [1213013.564496] init: php5-fpm main process ended, respawning
..... (repeated several times)
kernel: [1213014.143911] init: php5-fpm respawning too fast, stopped

My /var/log/php5-fpm.log is not populated at all. There is no php5-fpm.sock and in /run (or /var/run).

My /etc/php5/fpm/php-fpm.conf is below: (this file doesn't seem to be loaded now as I tried to put some bogus info into it but didn't cause any change)

; FPM Configuration ;


; Global Options ;

; Pid file
; Note: the default prefix is /var
; Default Value: none
pid = /run/
catch_workers_output = yes

; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
log_level = debug

; To configure the pools it is recommended to have one .conf file per
; pool in the following directory:

Permission checking:

ls -l /etc/php5/fpm/php-fpm.conf

-rwxrwxrwx 1 root root 4641 Nov  6 01:37 /etc/php5/fpm/php-fpm.conf

My include=/var/www/vhosts/ (this file does not seem to be loaded anymore)

    listen                 = /run/php5-fpm.sock
#    listen                =
    listen.backlog         = -1
    listen.allowed_clients =
    listen.owner           =           =
    listen.mode            = 0666

    user  =
    group =

    pm                   = dynamic
    pm.max_requests      = 0
    pm.max_children      = 15
    pm.start_servers     = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 3

    pm.status_path       = /php_pool_wwww.mysite.com_status
    ping.path            = /www.mysite.com_ping
    ping.response        = www.mysite.com_pong

    request_terminate_timeout = 30
    request_slowlog_timeout   = 20
    slowlog                   = /var/www/vhosts/

    rlimit_files = 131072
    rlimit_core = unlimited

     chroot = /var/www/vhosts/
    ; Chdir to this directory at the start. This value must be an absolute path.
    ; Default Value: current directory or / when chroot
    ; chdir = /htdocs

    catch_workers_output = yes

    env[TMP]      = /tmp
    env[TMPDIR]   = /tmp
    env[TEMP]     = /tmp

    security.limit_extension = .php
    ;   php_value/php_flag             - you can set classic ini defines which can
    ;                                    be overwritten from PHP call 'ini_set'.
    ;   php_admin_value/php_admin_flag - these directives won't be overwritten by
    ;                                     PHP call 'ini_set'
    php_flag[display_errors]            = on
    php_admin_value[error_log]          = /logs/php_err.log
    php_admin_flag[log_errors]          = on
    php_admin_value[memory_limit]       = 100M
    php_value[max_execution_time]       = 300

Permission checking:

ls -l /var/www/vhosts/

-rwxr-xr-x 1 1830 Nov  6 01:05 var/www/vhosts/

User/Group Permission checking:

groups : www-data

I don't think this has anything to do with nginx because php5-fpm itself cannot start at all right now anyhow, but for the sake of having all info: nginx is also set to use same user/group

share|improve this question
Try to set loglevel to debug in /etc/php5/fpm/php-fpm.conf. That should give you some clues in the error log (path in error_log variable in the same config file). This helped me. The problem on my setup, was that there were conflicting values in the pm.* variables in /etc/php5/fpm/pool.d/www.conf. The only symptom was the exact same as you describe in your question. – Frank Aug 28 '14 at 11:44
I got this when I made a typo in my listen directive path. Double-check that the directory you give for your listen directive exists if listening on a unix socket. – burt Jul 28 at 7:05

2 Answers 2

The process that upstart was watching died, but the pool workers are still running. To fix it, run:

sudo killall php-fpm
sudo start php5-fpm

The php5-fpm job will repeatedly exit with status 78 until all of the old worker threads are dead. Note that the server is typically functional in this state, even though upstart isn't managing the service. When it eventually dies, though, it won't automatically respawn, so it should be fixed ASAP. A simple reboot will also fix the problem, but will result in downtime.

share|improve this answer
killall gave me a php-fpm: no process found response. I executed ps aux | grep php and then manually killed all php processes. After that I could successfully restart php5-fpm service. – aldo.roman.nurena Oct 12 at 19:23
This fixed my issue, thanks! – Arda Nov 5 at 12:39

I recently encountered this same issue. It turns out that another process was already listening on the same port. To discover which process was running, I ran the following command:

sudo netstat -nltp

Turns out that hhvm was already listening on port 9000.

tcp6       0      0 :::9000                 :::*                    LISTEN      17765/hhvm      

As soon as I stopped the hhvm daemon, php5-fpm successfully started.

share|improve this answer
Now that I take a closer look at the fpm-pool.conf posted in the question, php5-fpm was not configured to listen on a port, but to use a sock. However, I'll keep this answer here in case anyone else encounters the same problem I ran into. – Jimmy Z Mar 12 at 15:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.