3

I'm having this issue:

Apache 2.2.26
PHP 5.4.32
PHP-FPM 5.4.32
Zend OpCache 7.0.3

PHP-FPM Config:

[testuser]
listen = /dev/shm/testuser-php.sock
listen.owner = testuser
listen.group = apache
listen.mode = 0660
user = testuser
group = testuser
catch_workers_output = yes
pm = ondemand
pm.max_children = 64
pm.max_requests = 10000
pm.process_idle_timeout = 20s
php_admin_value[error_log] = /home/testuser/var/php-fpm/error.log
php_value[memory_limit] = "1024M"

~mod_fastcgi.conf:

<IfModule mod_fastcgi.c>
    FastCGIExternalServer /dev/shm/testuser-php.fcgi -socket /dev/shm/testuser-php.sock -pass-header Authorization -idle-timeout 3600
</IfModule>

I'm getting "ERROR: unable to read what child say: Bad file descriptor (9)" after couple of hours of it running okay.

when trying to restart php-fpm, it failed, saying another pool with that name exists. i had to kill all php-fpm pools with kill 9 one bye one, then restart worked.

can anyone help me with this ? what's causing this error? I couldn't find anything concrete on the web with a definitive answer. and most are with ngnix

VER2X
  • 31
  • 1
  • 2
  • `/dev/shm/testuser-php.sock` - who taught you that stuff ? – drookie Dec 01 '14 at 05:56
  • This is standard php-fpm pool configuration, am I missing something ? – VER2X Dec 02 '14 at 07:02
  • This is not. /dev/shm isn't the place to hold sockets. Althouth this is not related to you problem, this is still disturbing. – drookie Dec 02 '14 at 13:43
  • About your issue. Try to increase verbosity of php-fpm, or try to switch to `dynamic` spawning method. See if it will help. – drookie Dec 02 '14 at 13:45
  • Thanks drookie, I'll try that and update this thread, I also noticed that in the time of crash the MaxClients on apache was reached, and probably hit the max children too, when that happens, does fpm knows how to deal with it ? – VER2X Dec 02 '14 at 19:25
  • Nope. It kinda knows before the limit happens. MaxClients is such limit, which tells apache to stop spawning new clients, until the engineer decides what should be done. I would recommend to switch to the nginx as the primary webserver, since you are already using the php-fpm. Apache is known to be slow and consuming, especially when it concerns static files serving. – drookie Dec 02 '14 at 19:29

0 Answers0