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

durumdara durumdara at gmail.com
Thu Sep 28 04:47:46 EDT 2006


Hi !

Mike Looijmans írta:
> Start with "if it's not a problem, it's not a problem".
If it is not problem in your site, possible it is problem in another
site... :-(
>
> 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...
Yes-yes !
With MySQL you can do it without problem !

But when you trying it with FireBird, PGSQL, ODBC, or with Remote
Server, you will get another experience...
Example: FireBird connect is very slow. When I not reuse the connection,
I get the page in 5-10 seconds. When I reuse, the generating is below 1
second.
This is not same !!!

dd



More information about the Mod_python mailing list