Server getting Crushed, where should I start optimizing? Apache or PHP-FPM?


Well-Known Member
Jan 18, 2003
Jacksonville, FL
cPanel Access Level
DataCenter Provider
I would need quite a few more details to make a recommendation. For starters:
  • How many sites on the server?
  • What is the normal load averages?
  • How much ram is on the server?
  • What version of PHP are you using?
  • Do you have PHP opcache installed?
  • What database version are you using?
In short, your Apache server is stuck sending replies (the W's in the Status page). This condition has many causes, so narrowing them down takes a bit of work. What I guess is happening (and just a guess), is that your server is not well tuned to handle high concurrency.

So when you send your email blast and a 100 people click on the link, the server bogs down. People then abandon the pages, causing the PHP process to be hung running. This condition basically continues out of control until the system is non responsive.

I've seen this 100's of times with PHP and high concurrency. You have to start identifying and removing the bottlenecks. Slow MySQL queries, PHP not closing DB connections, slow PHP execution, etc can all contribute to this condition.