So if you have three pages all built on sitePage, and you have 10 threads ruunning you will have (3*10*5) 150 possible connections, but you will only be able to use (3*5) 15 of them, since Webware creats one thread per request.
Move the self.db line to the module level in sitePage
db = DBPool..... Class sitePage(Page): def writeContent(self): conn = db.getConnection.....
jose wrote:
Hi all, I've got a quick question. If I establish a dbpool connection in my sitepage with say:
Class sitePage(Page): def __init__(self): Page.__init__(self) self.db = DBPool(MySQLdb, 5, user=user....)
Instead of doing it in the context initialization, is there any real problem to leaving the threads running? I've noticed that most people initialize dbpool with the context and have a application shutdown method to close it down. But since servlets stay in memory is this really necessary? Is there any harm in leaving them running (which is what I am assuming will happen the way I've outlined doing it)?
Thanks for the info in advance
Jose
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss
-- -Aaron http://www.MetroNY.com/ "I don't know what's wrong with my television set. I was getting C-Span and the Home Shopping Network on the same station. I actually bought a congressman." - Bruce Baum
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss