Can I optimize this mod_wsgi / apache file better?
Posted
by
tomwolber
on Server Fault
See other posts from Server Fault
or by tomwolber
Published on 2010-06-09T15:25:13Z
Indexed on
2012/03/26
17:32 UTC
Read the original article
Hit count: 232
I am new to Django/Python/ mod_wsgi, and I was wondering if I could optimize this file to reduce memory usage:
ServerRoot "/home/<foo>/webapps/django_wsgi/apache2"
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule wsgi_module modules/mod_wsgi.so
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /home/<foo>/logs/user/access_django_wsgi.log combined
ErrorLog /home/<foo>/logs/user/error_django_wsgi.log
KeepAlive Off
Listen 12345
MaxSpareThreads 3
MinSpareThreads 1
MaxClients 5
MaxRequestsPerChild 300
ServerLimit 4
HostnameLookups Off
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 5
WSGIDaemonProcess django_wsgi processes=5 python-path=/home/<foo>/webapps/django_wsgi:/home/<foo>/webapps/django_wsgi/lib/python2.6 threads=1
WSGIPythonPath /home/<foo>/webapps/django_wsgi:/home/<foo>/webapps/django_wsgi/lib/python2.6
WSGIScriptAlias /auctions /home/<foo>/webapps/django_wsgi/auctions.wsgi
WSGIScriptAlias /achievers /home/<foo>/webapps/django_wsgi/achievers.wsgi
© Server Fault or respective owner