PHP-FPM socket disappearing
Hello,
I installed Jessie on my new server few days ago and moved website that run
previously on Centos 5. I'm using Apache and PHP-FPM. Currently, there is only
one website on that server, but I still configured pool for it. What's
happening is that, after some time, at least once a day, socket that should be
listening for that user disappears, resulting in this error in Apache error log:
FastCGI: incomplete headers (0 bytes) received from server
"/dev/shm/user-php.fcgi
FastCGI: failed to connect to server "/dev/shm/user-php.fcgi
Looking at /dev/shm/ directory, user-php.sock is really missing, but
default php5-fpm.sock is still there.
I have this block in VirtualHost section for that website:
<IfModule mod_fastcgi.c>
Alias /php5-fcgi /dev/shm/pdfconve-php.fcgi
</IfModule>
Pool configured:
[user]
listen = /dev/shm/user-php.sock
listen.owner = user
listen.group = www-data
listen.mode = 0660
user = user
group = user
pm = dynamic
pm.max_children = 40
pm.max_requests = 2048
pm.start_servers = 30
pm.min_spare_servers = 10
pm.max_spare_servers = 35
request_terminate_timeout = 305
And there is also
FastCGIExternalServer /dev/shm/user-php.fcgi -socket /dev/shm/user-php.sock -pass-header Authorization -flush -appConnTimeout 2 -idle-timeout 60
in apache conf.
There is nothing interesting in php-fpm error log. There are some errors like this:
NOTICE: [pool user] child 32719 exited with code 0 after 76324.921427 seconds from start
followed by this line:
NOTICE: [pool user] child 29909 started
but I don't think that's relevant.
Any idea why this is happening and how to prevent it?
Thanks!
Reply to: