I'm presently managing a web application that sees several (~15) customers signing in once every day, after which departing the net application open where it instantly refreshes with new content every a few minutes. Each user tends to be open for around 15-18 hrs.

However at critical mass (~30-40) customers everything begins to decelerate significantly and also the HTTPD process begin to balloon in memory usage. I've added a cron job that restarts apache once an hour or so, but that only helps somewhat. All of the submissions are dynamically produced and new wach time, so caching pages is not a choice.

I've began to adjust the Timeout,MaxRequest and KeepAlive options, but any guidance could be greatly appreciated, when i have always left these on defaults previously.

This is what i've. Any apache prodigies have tips on how to optimize this config for above scenario? I believed a lengthy timeout is nice since the load occasions can occasionally end up with high.

# Timeout: The number of seconds before receives and sends time out.

Timeout 200

# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.

KeepAlive On

# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.

MaxKeepAliveRequests 100

# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.

KeepAliveTimeout 60

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# ServerLimit: maximum value for MaxClients for the lifetime of the server
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers       16
MinSpareServers    10
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
</IfModule>

This really is most likely a great question to enter ServerFault.

Your server is most likely changing (insufficient RAM).

Your MaxClients directive ought to be something similar to:

MaxClients ≈ (RAM - size_all_other_processes)/(size_apache_process)

You can look into several articles that explain how to fine-tune apache.

Cron-restarting is not! a great ideia. Maybe daily. But create solve this issue this way.

Hope it will help!