MaxClients Ubuntu stops responding

  • Posted August 7, 2013

Hello, I’m running a site on 512MB 20GB 1TB Ubuntu LAMP droplet. Its average 25-60 concurrent visitors all day. It’s working normally some time 4 -5 h then in moment no free memory, apache stop responding and site is off. I set swap file 1GB and swappiness=10 and when its working normally with free -m I see that there is about 160MB physical memory free and whole swap file. I think that problem is with MaxClients in apache2.conf , and I’m not sure what values to set. I see that max value is 256 for this server. What will be the optimal settings?


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.

I’m beginner in all this. <br>I experimented put down MaxKeepAliveRequests to 90 <br>Keep Alive Timeout to 4 <br>I put down MaxClients to 50 and <br>upper MaxRequestsPerChild to 150 and for now working <br> <br>@Pablo Would I get a better performance with Nginx (speed,…) <br>And whats the procedure to change apache with Nginx? <br>Thanks in advance

Why not use Nginx, instead? It’s not a memory hog, like Apache.

also I tested with 50 users memory is full, swap almost and after the test done, memory is not freeing