Symptoms
-
The following error appears when attempting to load a file in a site:
Server Error
503
Service Temporarily Unavailable -
Site shows error 504 intermittently
-
CloudLinux operating system is used or the extension Plesk Cgroups Manager is installed
-
The following errors can be found inÂ
/var/www/vhosts/system/example.com/logs/error_log
INTERNAL: the symptoms are not unique
[proxy_fcgi:error] [pid 31123:tid 139667655595776] (70007)The timeout specified has expired: [client 203.0.113.2:57054] AH01075: Error dispatching request to :
[proxy_fcgi:error] [pid 427900:tid 140512497018624] [client 203.0.113.2:51548] AH01079: failed to make connection to backend: httpd-UDS
[proxy:error] [pid 401035:tid 140513101293312] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/www/vhosts/system/example.com/php-fpm.sock (*) failed
-
PHP-FPM pool exits after some time
The PHP-FPM log file shows the following warning:
WARNING: [pool example.com] child 2920572 exited on signal 9 (SIGKILL) after 2611.194074 seconds from start
-
PHP-FPM pool memory errors appear in logs
The following messages appear in log
/var/log/messages
:129 kernel: Killed process 675388 (php-fpm) in VE "0" total-vm:1767832kB, anon-rss:114724kB, file-rss:11132kB, shmem-rss:12268kB
129 kernel: OOM killer in rage 0: 0 tasks killed
host kernel: [6441970.759935] 2996362 (php-fpm) invoked oom-killer in ub 10061 generation 504 gfp 0x200d2
host kernel: LVE: [8884] _lve_enter: Can't alloc ve #10151 lvp #0, rc -22
host mysqld: 2020-01-11T16:03:58.979977Z 16499264 [Note] Aborted connection 16499264 to db: 'example_db' user: 'jdoe' host: 'localhost' (Got an error reading communication packets)
Cause
PHP-FPM process is killed by Cgroups.
Resolution
Increase Cgroup memory limits:
For Plesk Cgroups Manager extension
-
To increase limits for all subscriptions under a service plan, navigate to Service Plan > Default Domain > RAM, CPU, DISK I/O.
For a single subscription, navigate to Subscriptions > example.com > Customize > RAM, CPU, DISK I/O
-
Below secion RAM, increase value of Limit or enable checkbox Unlimited
-
Click Apply
Additional information can be found in (Plesk for Linux) Cgroups Manager documentation.
For custom Cgroups implementation
Custom Cgroups implementation is for example CloudLinux LVE.
Its limits can be adjusted using CloudLinux LVE Manager Plesk extension.
For information and assistance contact CloudLinux Support at https://www.cloudlinux.com/support.