[mod_python] Session problem

Graham Dumpleton grahamd at dscpl.com.au
Wed Nov 22 16:02:15 EST 2006

Jakub Labath wrote ..
> Hi,
> I'm experiencing serious problems with my mod_python app.
> User A gets an unique cookie from my app.
> User B gets an unique cookie from my app.
> They surf for a bit suddenly the same unique cookie is sent to both
> the user A and user B.
> In turn user A becomes user B or vice versa.
> It seems as if the same cookie was served by mistake to two different clients.
> See the attached log.
> The other thing I noticed in the log is that the mod_python request
> was actually the same. Is that OK would two diferent request have the
> same memory address?
> The mod_python app is django.
> I've talked to one of the core django developers and he has never
> heard of such a thing nor did anybody else.
> My set-up is very similar to theirs nor am i doing anything special
> that would explain such behaviour.
> My set-up is
> Python 2.4.3
> Apache 2.0.58 (mpm_prefork)
> Mod Python 3.1.4
> Linux camembert 2.6.18-gentoo-r2camembert #1 SMP Sun Nov 19 11:05:54
> EST 2006 i686 Intel(R) Xeon(TM) CPU 2.80GHzGenuineIntel GNU/Linux
> Any help is much appreciated.

When you say cookies, are these cookies being constructed using Django's
infrastructure for creating them? Further, is the request object a mod_python
request object or a Django request object wrapper?

At this point it sounds like it may be a Django issue if you are using it as
it merely uses mod_python as a jumping off point and doesn't tightly
integrate with mod_python and use its cookies or sessions and provides
users with their own request object wrapper as far as I know.

That said, as a start I would strongly recommend that you upgrade to
mod_python 3.2.10 and see if your problems go away.


More information about the Mod_python mailing list