0

Honestly saying I've read apache documentation, but there are too many parameters, that I don't know how to configure (KeepAlive, ServerLimit, StartServers, MaxRequestWorkers, MinSpareThreads, MaxSpareThreads, ThreadsPerChild, Timeout, MaxKeepAliveRequests, KeepAliveTimeout, StartServers, MaxRequestsPerChild).

So, my application is the following. In peak loads it gets around 20-30 requests per second. Some requests perform heavy applications and it can take up to 10 seconds to complete them. During these requests there is pretty high load of CPU and RAM usage.

What I want to do is serve low (say 5) number of simultaneous requests and other requests should be queued. I think this should be done with high Timeout like Timeout 300.

But what about other parameters? There are too many of them and I don't know how to tune them.

I'm using mod_wsgi.

Any help will be highly appreciated.

UPDATE

Problems with default configuration is that I can't access site during peak loads. Site just loads and loads. Sometimes I just got 504 error.

Paul R
  • 171
  • 6
  • You don't. At least not initially. Every distribution has sensible defaults for the Apache configuration that work reasonable well in many cases. You start optimizing only after you ran the system for a bit and got an idea where the problems are. – Sven Oct 09 '15 at 08:58
  • I would say, that MaxRequestWorkers is the one you should tune in order to limit simultanous requests. Taken from the doc: The MaxRequestWorkers directive sets the limit on the number of simultaneous requests that will be served – SteffenNielsen Oct 09 '15 at 09:05

0 Answers0