Operating system: CentOS
OS version: 7
Web Server: nginx 1.20
I need some help regarding PHP processes and high memory usage.
I am running a server with around 20 WP websites, mostly with Woocommerce + Wordfence (once daily scan, timing decided by Wordfence). Recently I noticed the memory usage has reached almost 95% in the dashboard on average. Sites are getting slower as compared to previously.
Upon looking at the running processes under Memory tab, it seems there are many php-fcgid spawned and each is around 400MB - 600MB. CPU is low though.
In each site’s php settings, the memory limit is set to 256MB. Does the memory limit have any effect on the maximum memory used by the process?
I also noticed the PHP fcgid processes across different sites keeps spawning and does not terminate / clear up. This happens for low traffic sites too. CPU is at 0%.
I have set the sub processes to none and even 1 under PHP options. My understanding is that each visitor will spawn a new process. And after exiting the site, the process should terminate itself once after a while. The minimum process depends on the sub process setting. Is this correct?
Does having too many process imply high traffic / possible brute force attacks?