[mod_python] Persist database conn, or pers. variables - where I put them ?

Mike Looijmans nlv11281 at natlab.research.philips.com
Wed Sep 27 10:37:07 EDT 2006


Start with "if it's not a problem, it's not a problem".

I benchmarked MySQL with mod_python years ago. There was no noticable performance benefit whatsoever 
between re-using one connection for all DB traffic, multiple global connections in a pool, versus 
opening and closing a DB connection on every request.

With connection pooling comes the risk that you keep too many connections open for too long. If you 
serve both static and dynamic content, a pre-fork apache mpm may have 20 open connections while 
you're using only one...


Mike Looijmans
Philips Natlab / Topic Automation


durumdara wrote:
> I not fully understand that in this dynamic wwwserver context where I 
> can put persist objects.
> What I can do to keep my objects in the background ?



More information about the Mod_python mailing list