Skip to content

Instantly share code, notes, and snippets.

@dnozay
Created January 11, 2012 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnozay/1596656 to your computer and use it in GitHub Desktop.
Save dnozay/1596656 to your computer and use it in GitHub Desktop.
apache2 threads w/ 512K stack (default linux 8MB) + wsgi
# apache2 config tuning for linux (8MB default stack size)
# allows to run more threads, min stack size should depend on worse case scenario
#
#MaxClients 1000
#ThreadsPerChild 64
#MinSpareThreads 500
# default linux 8MB
#ThreadStackSize 8388608
#ThreadStackSize 4194304
#ThreadStackSize 2097152
#ThreadStackSize 1048576
# minimum working for me 512K
ThreadStackSize 524288
# 2 processes (or 2*num_cores+1) to handle reloading (due to maximum-requests).
WSGIDaemonProcess processname user=apache group=apache processes=2 threads=50 stack-size=524288 maximum-requests=500
# wsgi handler config.
#
#
import thread
#thread.stack_size(8*1024*1024)
#thread.stack_size(4*1024*1024)
#thread.stack_size(2*1024*1024)
#thread.stack_size(1*1024*1024)
thread.stack_size(512*1024)
# e.g. django
# import django.core.handlers.wsgi
# application = django.core.handlers.wsgi.WSGIHandler()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment