On 01/14/11 10:05, Kushal Kumaran wrote:
<cut>
This might help though:
https://code.google.com/p/modwsgi/wiki/ProcessesAndThreading
It seems if you're not using 'daemon' mode, global data might be shared.
Yes I read that thoroughly before I started out implementing a solution.
But in my case I wanted something that worked as expected and not be
depending on specific configuration of underlying technology as I can
not assure that these condition will be met.
You could create new connections for each request (and close them when
done). There won't be interference between select/fetch across
multiple database connections. Additionally, the documentation of
MySQLdb says it is a bad idea to share database connections between
threads.
That is a possible solution too, however the performance impact is in
the range of 40% while doing forced synchronization and overhead of the
singleton wrapper is around 20%. So the latter is what I have gone with.
Thanks for bouncing off ideas though, much appreciated.
--
mph
--
http://mail.python.org/mailman/listinfo/python-list