My question is what is the maximum number of users that Apache webserver 2.2.2 can handle, i have a website which sometimes gets over 300+ concurrent users, however apache d
Apache comes with 40-100 max threads. It can be increased to allow more threads to be handled at the same time.
The application should be monitored before making any changes to it. Based on the response, try to change "ThreadsPerChild" and "AcceptThreads" accordingly.
The default amount of "maximum" number of threads is usually enough; however, there can be conditions where this number may have to be increased. The threads usage can be monitored. To monitor, start the Administrative instance, select the HTTP server in question, and select Real Time Server Statistics at the bottom left.
If Idle Threads is close to or at zero, this is a problem. As long as Idle Threads is zero, no new client connections can be established. New clients will be put into a wait status until a thread becomes available. Our recommendation for this condition is to add the directive ThreadsPerChild with an increased value, approximately double the current value if it was in the range of 40 to 100, or plus 50, if it was above 100. The required minimum value (for the maximum parameter) can only be found by trial and error. If after increasing the value, the server runs smoothly, stop testing.
(source)
You will have to edit the httpd.h file to allow for a greater maxclients past the 256 hard coded limit and then recompile the httpd program. This is suggested in the configuration file for httpd.
Recommendations
Please use Keep Alive as it will increase the performance of your server. Disable keep Alive settings only when there is a firewall in between web or app. Or you are facing package drop issues/connection reset msg.
See this guide for an overview: http://www.devside.net/articles/apache-performance-tuning
It's all mostly about the Apache MPM that you have selected (thread based, or process based) and it's settings.
Then you need to match it up with the KeepAlive settings (I use a thread based MPM and hence set KeepAlives to On and for 3 seconds).
Are you using Apache under Linux or Windows? Which MPM?