[EMAIL PROTECTED] wrote:
> Where do I call closeDB in db.py

Actually this is a web.py specific question, so I suggest moving the 
discussion to the web.py mailing list.

I have just had a short look at web.py and yes it's a nice framework, 
very Spartan, but that may be just right for some kinds of projects. 
I'll follow that mailing list for a while.

To answer your question anyway: You shouldn't close anything when using 
the web.py database automatism. For simplicity, web.py keeps the 
connection while it is serving one URL, then it will be destroyed and 
automatically returned to the pool. I believe that should work fine, 
though it could be optimized. So leave db.py as it is.

However, you may need to define a limit to the numer of connections, 
like that:

     web.config.db_parameters = dict(
         dbn='postgres', user='scott', pw='tiger', db='foo',
         maxconnections=100, blocking=True)

Can you try that out and let me know whether it helps?

-- Christoph

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to