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
-
PHP-FPM pool exits after some time with the following warning found at PHP-FPM log file:
WARNING: [pool example.com] child 2920572 exited on signal 9 (SIGKILL) after 2611.194074 seconds from start
-
PHP-FPM pool memory errors as below examples are found at
/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 killedhost 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
kernel: oom_reaper: reaped process 1234 (php-fpm)
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 due to reached memory limits.
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.