I don't think this is the same issue.
The application with its Apache httpd+mod_wsgi and its PostgreSQL
database is the only thing running on the machine. The environment
variables (incl. DJANGO_SETTINGS_MODULE) are set by a Puppet
provisioned WSGI script that is used by the Apache setup:
---- 8< ----------------------------------
# vim: ft=python ts=4 sw=4 et:
from __future__ import absolute_import
import os
import sys
os.environ['DEVDAY_PG_DBNAME'] = "<%= @devday_dbname %>"
os.environ['DEVDAY_PG_HOST'] = "<%= @devday_dbhost %>"
os.environ['DEVDAY_PG_PORT'] = "<%= @devday_dbport %>"
os.environ['DEVDAY_PG_USER'] = "<%= @devday_dbuser %>"
os.environ['DEVDAY_PG_PASSWORD'] = "<%= @devday_dbpassword %>"
os.environ['DEVDAY_SECRET'] = "<%= @devday_secret %>"
os.environ['DJANGO_SETTINGS_MODULE'] = 'devday.settings.<%= @environment %>'
sys.path.insert(0, '<%= @python_path %>')
sys.path.insert(0, os.path.join('<%= @basedir %>', 'devday', 'devday'))
sys.stdout = sys.stderr
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
---- 8< ----------------------------------
The application uses a fresh virtualenv with the needed dependencies
installed via pip.
I will setup a separate test instance using the same Puppet manifests
next week and will add some middleware to log requests and environment
variables to see if I can find anything suspicious there. I don't want
to test this in production :-)
Best regards
Jan Dittberner