On Wed, Oct 20, 2010 at 10:47:41AM +0200, Gert Burger wrote:
> SQLObject doesn't seem to reconnect to a postgres DB when its
> connection(s) are lost. Is SO capable of reconnecting?
>
> I saw a few post related to SO and Mysql but nothing related to PG.
>
> A grep of the source also shows that only mysqlconnection.py has
> reconnect logic in it.
MySQL can automagically reconnect by calling connection.ping(True) -
after that if client library notes a connection is lost it tries to
reconnect. Users must understand though that automatic reconnect has its
set of problems; see
http://dev.mysql.com/doc/refman/5.0/en/auto-reconnect.html for details.
PostgreSQL's client library doesn't do a reconnect exactly to avoid
these problems. On the other hand having timed out connections in
SQLObject's pool is a problem, I understand. There have to be a way to
remove them from the pool to force SQLObject to open new connections.
Oleg.
--
Oleg Broytman http://phd.pp.ru/ ph...@ph...
Programmers don't die, they just GOSUB without RETURN.
|