MaxClients Ubuntu stops responding

August 7, 2013 3.9k views
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?
4 Answers
also I tested with 50 users memory is full, swap almost and after the test done, memory is not freeing
Why not use Nginx, instead? It's not a memory hog, like Apache.
I'm beginner in all this.
I experimented put down MaxKeepAliveRequests to 90
Keep Alive Timeout to 4
I put down MaxClients to 50 and
upper MaxRequestsPerChild to 150 and for now working

@Pablo Would I get a better performance with Nginx (speed,..)
And whats the procedure to change apache with Nginx?
Thanks in advance
See this thread:
Have another answer? Share your knowledge.