[mod_python] Session management

Hiroaki KAWAI kawai at iij.ad.jp
Wed Jan 12 09:48:39 EST 2005


Of cource, most popular and easiest way is to use Session module.
Session will store the information somewhere in 'session storage' that
the module knows how to get it, and the actual mechanism is hidden. 
# i.e., inter-process communication via file or database.

So, make sure that you save the session information to the session
storage in each request processing as Ron says. ;-)


Chris Jackson <christopher.jackson at gmail.com> wrote:
> Ah, that makes sense...Now I just need to find which "inter-process"
> technique I should be using in order to maintain consistency ;)
> 
> ~= Chris =~
> 
> 
> On Wed, 12 Jan 2005 12:55:47 +0900, Hiroaki KAWAI <kawai at iij.ad.jp> wrote:
> > > > Depending on what type of apache configuration you run, one or more
> > > > interpreters will be used. Sometimes interpreters die and new ones get
> > > > created.
> > >
> > > Hmm...it's interesting you say that somtimes the interpreters die and
> > > new ones get created because I'm running into a "problem" where I will
> > > test a mod_python page and it will works perfectly several times again
> > > and again, but then i'll test it out again, and the interpreter seems
> > > to "forget" the values.  I'll keep testing the page with the same
> > > values, and then the page will work again.
> > 
> > One interpreter is created per one apache child process. If you're running
> > prefork MPM (and set MaxRequestsPerChild or have multiple spare child
> > servers), you're posting a HTTP request sometimes to the same interpreter,
> > sometimes to other interpreter.
> > I think one of 'inter-process' techniques is useful for what you're
> > trying.
> > # If I'm saying wrong, someone please correct. :-)
> > 
> > ---Hiroaki Kawai
> > 
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python
> >

---Hiroaki Kawai



More information about the Mod_python mailing list