Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8446887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:02:34+00:00 2026-06-10T10:02:34+00:00

I have two django based web applications on the same server. One of them

  • 0

I have two django based web applications on the same server.
One of them i’ll call CORRECT_PROJECT and the other one WRONG_PROJECT

The last one, CORRECT_PROJECT, is installed using a virtual environment and uses a different version of django (1.4). There’s a very strange problem: sometimes, usually after a log out or an email confirmation (but sometimes looks just random!), the server returns a 500 internal server error and the error log says

“Could not import settings ‘WRONG_PROJECT.settings’ (Is it on sys.path?): No module name WRONG_PROJECT.settings, refer: CORRECT_PROJECT/URL”

That is, by loading CORRECT_PROJECT, sometimes the system (WSGI? Apache? Django?) tries to load the settings from WRONG_PROJECT.

By hitting refresh aggressively the error disappears.
What could be wrong? How can I debug?

CORRECT_PROJECT uses WSGI in deamon mode.

Solution

Use deamon mode: http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:02:36+00:00Added an answer on June 10, 2026 at 10:02 am

    You are using wsgi.py from Django 1.4. That will not work when hosting multiple web apps in the same process.

    Best solution is to use daemon mode and delegate each to a distinct daemon process group.

    If can’t do that, change the wsgi.py files of both so they do not use:

    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
    

    but instead use:

    os.environ["DJANGO_SETTINGS_MODULE"] = "mysite.settings"
    

    Change mysite.settings as necessary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two servers - one Django, the other likely to be written in
I have two models, one a vanilla Django model, another an unmanaged model wrapping
I have two models in Django for a 2d map based game: class Block(models.Model):
My django based website will have 3 seperate menus. The items of first one
I have two django sites that use the same database and share some of
I have two sites say foo.com and bar.com and are both Django based. Primary
Is there any way to share same transaction between two threads in a django-based
Is is possible to programatically join two tables using Django's ORM? I have two
I have two models in my Django application, for the purposes of storing search
I have two models in my Django 1.1.1 application: class UserRequest(models.Model): # blah blah

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.