Limit simultanious PHP requests accross all virtual servers

I'm using a 4gb / 2 core Digital Ocean VPS to manage around 30 low bandwidth sites.

I've recently installed a Wordpress security plugin (Wordfence), in each installation, so I can use their central dashboard to monitor the security of all sites.

The issue I'm having is that when this dashboard first loads up, it contacts all sites to get a security report from each... at the same time.

That request to each of the 30+ sites is enough to max out memory which leads to processes being killed.

What would be the best approach to limit global calls like this?


Staff member

May I ask when first call happens, did you see 30 extra php processes starting at the same time?
And please confirm if issue is due to OOM instead of PHP timeout by `top` or `free -h`. It will also help if you can also provide some error log `tail -f /usr/local/lsws/logs/error.log` during the testing.

I can confirm the issue is memory related, I can see the live Digital Ocean graph hit 95% memory usage followed by immediate SQL errors on all Wordpress installations. The logs for the time period aren't all that useful though. I just get lots of 'null' entities during time we hit the error: