0

I'm trying to figure out a really weird problem with this django program. Basically we have a django based app thats been split into a second app, mainly by loading the settings_sis.py file instead of the settings.py file, in the relevant site's /etc/httpd/conf.d/002-blah.conf file. This is set with the line "DJANGO_SETTINGS_MODULE=settings_sis" Anyway, completely randomly when I refresh the site, around 50% of time time the site errors out. When that happens I can see the following in the debug error message:

SESSION_FILE_PATH   None
SESSION_SAVE_EVERY_REQUEST  False
SETTINGS_MODULE     'settings'
SITE_ID     100

So I'm making the assumption that SETTINGS_MODULE is the same thing as the DJANGO_SETTINGS_MODULE which I don't see in the list. Why on earth would this be set to the wrong thing at a completely random 50% of the time?

Apache configuration excerpt:

PythonHandler core.handlers.production
PythonInterpreter citizen
SetEnv DJANGO_SETTINGS_MODULE settings_sis
SetEnv PYTHON_EGG_CACHE /tmp
user1279741
  • 127
  • 4
  • Also feel free to tell me if I'm barking up the wrong tree with the SESSIONS_MODULE weirdness... – user1279741 Apr 09 '14 at 20:57
  • Well I just wrote this and then realized i should copy settings_sis.py over settings.py and it seems to work now, but we can't really cant leave it with such a giant hack – user1279741 Apr 09 '14 at 20:59
  • Turned out to be an overlapping PythonHandler, not quite sure how to change it, but the fix was that we just copied the settings files to make them identical. – user1279741 May 17 '14 at 05:18

0 Answers0