Dear SQLAlchemists, I'm currently developping an app which must deals with temporary database failures (using MySQL server with SA 0.3.2, with the QueuePool). This is a Twisted/SQLAlchemy based app. There is a retry mecanism: the app retries the database access, sleeping a while between the tries. The test case is the following:
1. The app is running and gets objects which the app must store in the database. Objects are sent to the app through a twisted's deferred. This means if an object cannot be stored, the retry mecanism (and its sleep) won't block other objects process. 2. To test my code, I stop MySQL server while storing objects, thus entering in the retry mode. 3. The MySQL server is not accessible anymore, and the pool tries to get connections from its queue for each received object. 4. after a while, the pool cannot get connections anymore as the pool size limit is reached: "QueuePool limit of size 5 overflow 10 reached, connection timed out" 5. I restart the MySQL server, but the pool still can't create valid connection, it gets stuck into the size limit checks. I'd like to invalidate the whole pool connections, in order this one to create/get freshly new connections. I tried the QueuePool.dispose() func, which closes any connection remaining in the queue, but does not change the value of the overflow: overflow is always > max_overflow, the pool still cries "QueuePool limit of size 5 overflow 10 reached, connection timed out"... Do you have any idea how to "clean" the pool connections in a convenient way ? Should the QueuePool.dispose() func adjust the overflow value ? Thanks in advance for your help and advices. 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 [email protected] 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 -~----------~----~----~----~------~----~------~--~---
