Created
January 11, 2012 20:42
-
-
Save dnozay/1596656 to your computer and use it in GitHub Desktop.
apache2 threads w/ 512K stack (default linux 8MB) + wsgi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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