PyDO2: How to handle DB restart?

Faber <[email protected]> Sat, 24 Jun 2006 14:34:31 +0200
Newsgroups gmane.comp.web.skunkweb
Organization FaberBox
Message-ID <[email protected]>
Hello,

I'm using PyDO2 with PostgreSQL in a web application, hosted by a thirdy 
party provider, using a connection pool:

db_pool = ConnectionPool(
	max_poolsize=10,
	keep_poolsize=0,
	delay=0.2,
	retries=10
)

Sometimes the hosting restarts the PostgreSQL server, and I get this 
exception in my Python code (even *after* the server has been restarted):

"ProgrammingError: terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request."

How could I avoid this exception?

Thank you

-- 
Faber
http://faberbox.com/
http://smarking.com/

We live in a society exquisitely dependent on science and technology,
in which hardly anyone knows anything about science and technology. -- Carl 
Sagan

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642