The current configuration I have has been running perfectly for more than one year.
My apache is configured to include this mod_wsgi configuration:
Alias /uploads/ "/home/django/myproject/uploads/"
<Directory "/home/django/myproject/uploads/">
Order allow,deny
Options Indexes
Allow from all
IndexOptions FancyIndexing
</Directory>
Alias /static/ "/home/django/myproject/sitestatic/"
<Directory "/home/django/myproject/sitestatic/">
Order allow,deny
Options Indexes
Allow from all
IndexOptions FancyIndexing
</Directory>
WSGIScriptAlias / "/home/django/myproject/apache/django.wsgi"
<Directory "/home/django/myproject/apache">
Order deny,allow
Allow from all
</Directory>
And my /home/django/myproject/apache/django.wsgi looks like this:
import os
import sys
sys.path.append('/home/django')
sys.path.append('/home/django/myproject')
os.environ['DJANGO_SETTINGS_MODULE']='myproject.settings'
import djcelery
djcelery.setup_loader()
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
Pretty typical I guess.
In my httpd.conf I have this line:
Include "/home/django/myproject/apache/apache_django_wsgi.conf"
Whenever this conf is loaded, apache processes jump at 100% causing me MemoryErrors …
When I comment out the include line above, starting apache is smooth and as it should, memory wise.
I couldnt find anything in the apache logs, even set it on debug mode.
It is obvious this memory leak, if I may call it so, it is cause by either mod_wsgi or my django app.
How would you recommend to trace the error/isolate the issue? Any feedback is appreciated!
The issue was a buggy function in one of my django apps which was holding everything in memory.