Question: Website in Plesk fails to load with error 503: Memory cgroup out of memory: Kill process
Applicable to: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 (/var/log/plesk-php8x-fpm/error.log):
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 0x200d2host kernel: LVE: [8884] _lve_enter: Can't alloc ve #10151 lvp #0, rc -22kernel: 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)CausePHP-FPM process is killed by Cgroups due to reached memory limits.
ResolutionIncrease Cgroup memory limits:
For Plesk Cgroups Manager extension1.Log into Plesk
2.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/O3.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.