This is a classic use case for pool_recycle=<some number of seconds> , which will prevent old connections in the pool from being used. It does of course assume that connections remain checked into the pool when not being used (i.e. no Sessions hanging open, etc).
http://www.sqlalchemy.org/docs/core/engines.html?highlight=create_engine#sqlalchemy.create_engine On Dec 20, 2010, at 9:01 AM, Borax wrote: > Hi, > > I have a Python application (using Zope 3 framework) which is > connected to an Oracle database throught SQLAlchemy. > Everything is OK except for one thing : each week, the Oracle server > is shutted down for a full cold backup and afterwards, opened > SQLAlchemy connections are broken and can't be re-established cleanly, > so that I have to restart the application. > I'm already using connections pooling and I recently activated > connections recycling, but it doesn't seems to change anything :-( > > Any help or idea would be welcome... > > Regards, > Thierry > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to sqlalch...@googlegroups.com. > To unsubscribe from this group, send email to > sqlalchemy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.