[mod_python] Mod_Python, multicore and concurrency

Graham Dumpleton graham.dumpleton at gmail.com
Sat May 30 00:28:28 EDT 2009

If you are using mod_python sessions at the same time, they will block
another request using same session at the same time. It can also block
other distinct sessions as well because of the limited number of
shared locks used to mediate global session locking.

Other than that guess, it is impossible to answer without know exactly
what your code does.


2009/5/29 John Lister <john.lister at kickstone.com>:
> Hi i'm a newbie with mod_python and a quick search of google threw up no
> results..
> I'm trying to run a fairly a python script under apache as an app server
> using mod_python. This is fairly cpu bound so i'd like to run on a multi
> processor/core setup (at least 8). I understand that because of the GIL i'd
> need multiple python processes to do this so i've set up apache with the
> pre-fork option.
> However a quick test with a number of simultaneous requests shows
> (generally) only one apache process maxing out the cpu - i'd expect one per
> core. I would expect a python interpreter per apache process or is that a
> bad assumption? Or does mod_python place some other limit on things?
> Thanks
> _______________________________________________
> 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