On Nov 7, 2007, at 12:51 AM, Hong Yuan wrote:
> > Hi, > > In the release note of 0.3.7, the following is mentioned: > > - much improved auto-reconnect support > > But how can one configure this? I am using 0.3.10 with Postgresql. > Very often, after some period of inactivity, the connection is closed > and the whole application has to be closed and restarted for the > database connection to work again. > > How is auto-reconnect suppposed to work? Is there any connection > parameter to alter for instance? > auto reconnect is for when an existing pooled connection loses its connection to the database. the connection upon next access will raise an error, and then be removed from the pool to be recycled. the feature is only so that stale connections don't hang around in the connection pool, requiring an app restart. However, note that various unfixed bugs in psycopg2 make this feature nearly unworkable on that platform since psycopg2 raises the "connection lost" errors at random times. however, youre dealing with a plain database timeout issue. for that, auto-reconnect isnt needed; you use the "pool_timeout" option documented at http://www.sqlalchemy.org/docs/04/dbengine.html#dbengine_options (similarly for 0.3). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---