I'm using Django with mod_wsgi and need to tune the httpd.conf to handle 500 requests per second at peak. Right now I have the following configuration:

StartServers 3
ServerLimit 15

MinSpareThreads 75
MaxSpareThreads 250

MaxRequestWorkers 250
ThreadsPerChild 25

MaxMemFree 2048
MaxConnectionsPerChild 10000

WSGIApplicationGroup %{GLOBAL}
WSGIDaemonProcess django_process processes=23 threads=2

But I have no clue how it works and whether it is optimal configuration for my needs. Also, I don't know what each parameter means and how apache directives (StartServers etc.) work with mod_wsgi processes and threads.

Can anybody guide me how to tune this parameters or at least explain what do they mean, why do we need processes and threads and not just processes or threads?

Thanks is advance.

P.S. It is apache2/bin/httpd.worker Right now it handles around 200-300 requests per second, but the system is unstable. I got 502 errors. The server just stops.

  • What's in the logs when you get 502 errors? – Michael Hampton Aug 8 at 17:13
  • @MichaelHampton , AH00295: caught SIGTERM, shutting down – Andrew Fount Aug 8 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.