[mod_python] A question about running 2 apps with mod_python

Chris Guin cguin at bbn.com
Wed Jan 16 17:09:34 EST 2008


Thanks for the response!

My httpd.conf was not set up to use VirtualHosts at all - it simply 
uses different Location defintions, separated by distinct 
PythonInterpreter directives, to send URLs to the correct Django 
application.  Just to make sure there wasn't some arcane httpd 
feature that required the definition of at least 1 VirtualHost, I 
enclosed all my Location definitions in one VirtualHost and restarted 
httpd to no avail.  (httpd -S seemed to like my VirtualHost 
definition, so I know it is at least syntactically correct).

The problem is still largely random, but only seems to occur when 20 
or more users are logged in, and can sometimes be fixed by restarting 
httpd.  The Django documentation suggests that httpd.worker should 
not be used, but without giving any reason for it.  It may be that my 
problem is more Django related than mod_python related, so I'll see 
what if anyone on the boards over in Django land can help.

Thanks,
Chris Guin

At 06:15 PM 1/15/2008, you wrote:
>Have you defined NameVirtualHost directive properly. Lack of this
>directive when using multiple VirtualHost definitions is normally the
>cause of such mixing of site pages.
>
>Graham
>
>On 16/01/2008, Chris Guin <cguin at bbn.com> wrote:
> > We've recently switched to using worker mpm instead of prefork, and
> > things have mostly been going smoothly.  Our server is running 2
> > Django applications, one of which is forum software.  Their URL
> > spaces are entirely distinct, and each "Location" in httpd.conf has
> > been set to use one of two different PythonInterpreters depending on
> > the app it services.
> >
> > We've noticed that regular accesses to the forum pages will randomly
> > (about 50% of the time) call up the 404 page for the other
> > application.  We've noticed no similar problems in the reverse
> > direction (from the other app to the forums).  Refreshing the 404
> > page eventually gets us to the forum.
> >
> > The randomness of the error suggests to me that it has to do with
> > which httpd.worker process or thread is picking up the request, but I
> > can't explain what difference it would make.  Since we have switched
> > to worker from prefork, I suspect this may be at fault somehow.
> >
> > Any insight would be tremendously appreciated!
> >
> > Chris Guin
> >
> >
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python
> >




More information about the Mod_python mailing list