We are having issues on a server that needs to backup (dump) a database in the size of 18 GB (and a few smaller ones) - or so i am guessing.
The PHP-FPM process keeps crashing every night at around 01:1x just at the time when the backup for this specific user is in progress so i am guessing that this is the issue as there is low traffic at night for the websites.
The error from the crash is:
[02-Aug-2017 01:08:18] WARNING: [pool user] child 12417 exited on signal 9 (SIGKILL) after 3360.646280 seconds from start
[02-Aug-2017 01:08:18] NOTICE: [pool user] child 21628 started
[02-Aug-2017 01:08:18] WARNING: [pool user] child 16758 exited on signal 9 (SIGKILL) after 2309.010300 seconds from start
[02-Aug-2017 01:08:18] NOTICE: [pool user] child 21629 started
[02-Aug-2017 01:08:18] WARNING: [pool user] child 16926 exited on signal 9 (SIGKILL) after 2267.207700 seconds from start
... etc with all the pools.
We are using PHP FPM 7.0.21 / Zend Opcache v7.0.5, Apache 2.4.27 with event MPM, Mariadb 10.0.31.
This is just my guess again but is the problem some kind of timeout when FPM/apache are waiting for mySQL to respond?
PHP.ini max_execution_time is set to 18000 and ProxyTimeout in Apache is 1800. Should we increase ProxyTimeout?
There are no general apache errors, just domain errors:
[Wed Aug 02 01:08:18.340560 2017] [proxy_fcgi:error] [pid 12131:tid 139960107632384] [client xxxx:22467] AH01067: Failed to read FastCGI header
[Wed Aug 02 01:08:18.340618 2017] [proxy_fcgi:error] [pid 12131:tid 139960107632384] (104)Connection reset by peer: [client xxxx:22467] AH01075: Error dispatching request to :
[Wed Aug 02 01:08:18.358700 2017] [proxy_fcgi:error] [pid 12131:tid 139959679604480] [client xxxx:16078] AH01067: Failed to read FastCGI header, referer: https://www.domain.com
[Wed Aug 02 01:08:18.358738 2017] [proxy_fcgi:error] [pid 12131:tid 139959679604480] (104)Connection reset by peer: [client xxxxx:16078] AH01075: Error dispatching request to : , referer: https://www.domain.com
and then
[Wed Aug 02 01:08:35.748875 2017] [proxy_fcgi:error] [pid 21686:tid 139960124417792] [client xxxx:36854] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Zend_Db_Adapter_Exception: Can't connect to database! in /home2/user/domains/....
I am not sure which timeout to increase or how to deal with this. The server should have enough resourses to handle this (32 GB RAM, 8 cores, etc - dedicated server).
So to sum it up, looks like the database stops responding on dump and apache / fpm cannot connect to mySQL and dies. Any ideas how to fix this?
Thanks
The PHP-FPM process keeps crashing every night at around 01:1x just at the time when the backup for this specific user is in progress so i am guessing that this is the issue as there is low traffic at night for the websites.
The error from the crash is:
[02-Aug-2017 01:08:18] WARNING: [pool user] child 12417 exited on signal 9 (SIGKILL) after 3360.646280 seconds from start
[02-Aug-2017 01:08:18] NOTICE: [pool user] child 21628 started
[02-Aug-2017 01:08:18] WARNING: [pool user] child 16758 exited on signal 9 (SIGKILL) after 2309.010300 seconds from start
[02-Aug-2017 01:08:18] NOTICE: [pool user] child 21629 started
[02-Aug-2017 01:08:18] WARNING: [pool user] child 16926 exited on signal 9 (SIGKILL) after 2267.207700 seconds from start
... etc with all the pools.
We are using PHP FPM 7.0.21 / Zend Opcache v7.0.5, Apache 2.4.27 with event MPM, Mariadb 10.0.31.
This is just my guess again but is the problem some kind of timeout when FPM/apache are waiting for mySQL to respond?
PHP.ini max_execution_time is set to 18000 and ProxyTimeout in Apache is 1800. Should we increase ProxyTimeout?
There are no general apache errors, just domain errors:
[Wed Aug 02 01:08:18.340560 2017] [proxy_fcgi:error] [pid 12131:tid 139960107632384] [client xxxx:22467] AH01067: Failed to read FastCGI header
[Wed Aug 02 01:08:18.340618 2017] [proxy_fcgi:error] [pid 12131:tid 139960107632384] (104)Connection reset by peer: [client xxxx:22467] AH01075: Error dispatching request to :
[Wed Aug 02 01:08:18.358700 2017] [proxy_fcgi:error] [pid 12131:tid 139959679604480] [client xxxx:16078] AH01067: Failed to read FastCGI header, referer: https://www.domain.com
[Wed Aug 02 01:08:18.358738 2017] [proxy_fcgi:error] [pid 12131:tid 139959679604480] (104)Connection reset by peer: [client xxxxx:16078] AH01075: Error dispatching request to : , referer: https://www.domain.com
and then
[Wed Aug 02 01:08:35.748875 2017] [proxy_fcgi:error] [pid 21686:tid 139960124417792] [client xxxx:36854] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Zend_Db_Adapter_Exception: Can't connect to database! in /home2/user/domains/....
I am not sure which timeout to increase or how to deal with this. The server should have enough resourses to handle this (32 GB RAM, 8 cores, etc - dedicated server).
So to sum it up, looks like the database stops responding on dump and apache / fpm cannot connect to mySQL and dies. Any ideas how to fix this?
Thanks