> I am wondering if there isn't a better way to handle connection issues > than how I am doing it (see the sample below)? > You should give a try with SA 0.3.3 (at least), since several connection problems have been solved.
See thread "MySQL has gone way". Although it talks about MySQL, the bugfix is about the connection pool/object: http://groups.google.com/group/sqlalchemy/browse_thread/thread/9412808e695168ea/93ac328e84206c4b More precisely, also have a look at this thread " How to regenerate connections in the QueuePool". You'll find a test case which reconnects/regenerates connections when the database goes down: http://groups.google.com/group/sqlalchemy/browse_thread/thread/f8f5a86ed26d19a7/857f4c70371ea96d FWIW, you'll find a example of retry mechanism which handle database recovering (well, actually, this code is not that clean...). Finally, IIRC, be aware databases exceptions encapulsation into SA's exception has been improved since 0.2.8: some weren't caught resulting in a raise of the original, underlying database exceptions. Hope it helps, Cheers Seb -- Sébastien LELONG sebastien.lelong[at]sirloon.net --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---