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 8553471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:39:36+00:00 2026-06-11T14:39:36+00:00

I have many django installation which must run under one URL only. So I

  • 0

I have many django installation which must run under one URL only. So I have a structure like

  1. Django Installation 1
  2. Django Installation 2

  3. Django Installation N

under my root directory.

Now from the URL “www.mysite.com/installation1” I pick up subpart “installation1” and set the os.environ[‘DJANGO_SETTINGS_MODULE’] to “installation.settings” and let the request be handled. Now for the request “www.mysite.com/installation2” I must do the same. However since django caches site object, AppCache etc internally I must restart wsgi process before each request so that internal cache of django gets cleared. ( I know performance would not be good but Im not worried about that). To implement the above scenerio I have implemented the below solution:

  1. In httpd.conf as WSGIDaemonProcess django processes=5 threads=1
  2. In the django.core.handlers.wsgi I made the following change in def “call“

    if environ['mod_wsgi.process_group'] != '':
        import signal, os
        print 'Sending the signal to kill the wsgi process'
        os.kill(os.getpid(), signal.SIGINT)
    return response
    

My assumption being that deamon process would be killed at each request after the response has been sent. I want to confirm this assumption that my process would only be killed only and only after my response has been sent.

Also is there another way I can solve this problem

Thanks

EDIT: After the suggestion to set the MaxRequestsPerChild to 1 I made the following changes to httpd.conf

KeepAlive Off
Listen 12021
MaxSpareThreads 1
MinSpareThreads 1
MaxRequestsPerChild 1
ServerLimit 1
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 1
WSGIDaemonProcess django processes=5 threads=1

But my process is not getting restarted at each request. once the process is started it keeps on processing the request. Am i missing something?

  • 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-11T14:39:37+00:00Added an answer on June 11, 2026 at 2:39 pm

    This should be possible using the apache directive MaxRequestsForChild to 1 as stated in http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxrequestsperchild

    However it will be global to every process daemon.

    Update:

    Or you chould check maximum-requests option into WSGIDaemonProcess as in http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines

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

Sidebar

Related Questions

I have Django Model with many fields which user must fill. If I'll create
First of all I have many Django instances setup and running like this. In
I have two related models (one to many) in my django app and When
I have one website in django , with many content pages. I want to
I have a Django model which can have many generic relationships. This is achieved
If I had a One-To-Many relationship in Django, like the Django example at http://docs.djangoproject.com/en/dev/topics/db/models/#fields
I use django in project. I have many cron jobs which operate with database.
I intend to have many python with django applications on my server, is it
I have a symmetrical many-to-many relationship in Django class Person(models.Model): id = models.CharField(max_length=32, primary_key=True)
I have a many-to-many relationship in my django application where I use the add

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.