apache is spawnning way too many processes without having multiple client connections.

A droplet hosting Magento 2 with apache was working fine for a long time. But since yesterday it has become unresponsive. When I ssh’ed into the machine and checked the server, I saw that apache has spawned >100 child processes while not having that much client req. load (this is only a testing site i.e. it is not live to customers). If anyone came across the issue, can you share with me your thoughts on how you overcame the issue (or any feedback on how to debug it will also be great)?

Thanks in advance


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @akassahun,

I’ve had similar cases, it was due to my MPM being set as prefork. I found that MPM_event was the best option or at least in my opinion. You can read further about different options and how they work here :

Having said that, PHP_FPM works pretty good with MPM_EVENT. I’ll recommend switching your MPM from prefork to event. Another good option is setting it to ‘worker’.

Regards, KFSys