High Memory Usage by php fpm

Posted April 28, 2018 12.1k views

Hi I did a load test as soon aa 200 user hit a page non cached Memory usage skyrocketed and Crash My sql
Im using Nginx Fast CGI cache
Using 5$ server on do
Can Someone tell me how to fix this?

1 comment

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.

Submit an Answer
5 answers

When the consumption of resources increases, you’ll need more resources. It’s a technical limitation. Increase your droplet size.

  • Hi Using a caching plugin (no fast cgi cache) Like w3tc , cache enabler Easily handle 10k Hits Without any issue and Php Memory Usage around 40 to 65% Why? Same site same Plugin

Mind you not every site in the internet is wordpress. And w3tc is a wordpress plugin.

If you are using wordpress then you have several other caching options… Wp-rocket is a good one.

Sorry i forget to mention wordpress although caching plugin can handle 10k user but Nginx fast cgi cache isn’t why?

It would depend on how the lemp stack is configured. How many mysql processes are running? How may php-fpm process as running?

If your site is getting traffic you will have to look at upgrading your server. Compression and Caching only go so far.

You can only fit so many clowns into a car ;-)

When you hit this ceiling you have a few choices. Either toss more logs on the fire and increase the size of the server (vertical scale) or make more fires (horizontal scale)