Running out of memory
I have set up ISPConfig to host a handful of sites. The problem is, we're seeing 500 errors due to running out of memory often.
I have checked the php7-fpm settings, it is set to 256MB and there is more than enough RAM available.
Could you help me identify the issue from your experience? Also, the swap is only 256MB. Do we benefit from increasing the swap size?
I recommend taking a look at your Linode's process by running the top command:
By running the top command you can view which processes are running on the server and taking up the most resources. More information on top can be found in this article
Furthermore, this guide on Troubleshooting Memory and Networking Issues may offer some assistance in this issue as well.
Once you have determined what service is causing the memory issue, reply here and we will do our best to assist with tuning that application.
Increasing The swap size would not benefit you in this matter. The swap space is virtual memory, allowing the physical memory to swap out unused data temporarily when additional physical memory is needed. Thus in this case you want to address what process is using the physical memory.
Hi. Thank you for the reply.So, I ran a few tests.
From an hour of watching, I see that PHP-FPM is the one taking the most RAM. I have made changes to its configuration to run children on demand, expire processes after 10s.
Then I tried to log in to 6 wordpress sites' WP-Admin at the same time. It took a 2 minutes more this time around and by the 5th site the OOM errors appeared across all sites.
I was looking at the top command output and it seems that only when this one reaches to 0, the errors appear
Afterwards, no matter what I do (i.e. restart nginx, restart php7-fpm) nothing works but rebooting the whole system.
Any help is appreciated. We are using this as a test run to get to know Linode better and get to know how to use it better so that later we can start using Linode full force.
TY in advance!