I'm getting an odd issue with connection recycling. Here's whats happening:
20080616 10:50:01,654 INFO [sqlalchemy.pool.QueuePool.0x..2c] Connection <_mysql.connection open to 'localhost' at 8bf4ddc> exceeded timeout; recycling 20080616 10:50:01,654 INFO [sqlalchemy.pool.QueuePool.0x..2c] Closing connection <_mysql.connection open to 'localhost' at 8bf4ddc> 20080616 10:50:01,655 INFO [sqlalchemy.pool.QueuePool.0x..2c] Created new connection <_mysql.connection open to 'localhost' at 8bf9f2c> 20080616 10:50:01,656 INFO [sqlalchemy.pool.QueuePool.0x..2c] Connection <_mysql.connection open to 'localhost' at 8bf9f2c> checked out from pool 20080616 10:50:02,249 INFO [sqlalchemy.pool.QueuePool.0x..2c] Connection <_mysql.connection open to 'localhost' at 8bf9f2c> being returned to pool 20080616 10:50:02,251 INFO [sqlalchemy.pool.QueuePool.0x..2c] Connection <_mysql.connection open to 'localhost' at 8bf9f2c> checked out from pool 20080616 10:50:02,907 INFO [sqlalchemy.pool.QueuePool.0x..2c] Connection <_mysql.connection open to 'localhost' at 8bf9f2c> being returned to pool 20080616 10:50:02,909 INFO [sqlalchemy.pool.QueuePool.0x..2c] Connection <_mysql.connection open to 'localhost' at 8bf9f2c> checked out from pool 20080616 10:50:02,913 INFO [sqlalchemy.pool.QueuePool.0x..ac] Connection <_mysql.connection open to 'localhost' at 91261e4> exceeded timeout; recycling 20080616 10:50:02,913 INFO [sqlalchemy.pool.QueuePool.0x..ac] Closing connection <_mysql.connection open to 'localhost' at 91261e4> 20080616 10:50:02,914 INFO [sqlalchemy.pool.QueuePool.0x..ac] Created new connection <_mysql.connection open to 'localhost' at a3841bc> 20080616 10:50:02,915 INFO [sqlalchemy.pool.QueuePool.0x..ac] Connection <_mysql.connection open to 'localhost' at a3841bc> checked out from pool 20080616 10:50:03,100 INFO [sqlalchemy.pool.QueuePool.0x..2c] Invalidate connection <_mysql.connection open to 'localhost' at 9c06b0c> (reason: OperationalError:(2006, 'MyS QL server has gone away')) 20080616 10:50:03,101 INFO [sqlalchemy.pool.QueuePool.0x..ac] Invalidate connection <_mysql.connection open to 'localhost' at 9c137a4> (reason: OperationalError:(2006, 'MyS QL server has gone away')) 20080616 10:50:03,101 INFO [sqlalchemy.pool.QueuePool.0x..2c] Closing connection <_mysql.connection open to 'localhost' at 9c06b0c> 20080616 10:50:03,101 INFO [sqlalchemy.pool.QueuePool.0x..ac] Closing connection <_mysql.connection open to 'localhost' at 9c137a4> 20080616 10:50:03,102 INFO [sqlalchemy.pool.QueuePool.0x..2c] Connection None being returned to pool 20080616 10:50:03,102 INFO [sqlalchemy.pool.QueuePool.0x..ac] Connection None being returned to pool 20080616 10:50:03,103 INFO [sqlalchemy.pool.QueuePool.0x..2c] Pool disposed. Pool size: 5 Connections in pool: 0 Current Overflow: -5 Current Checked out connections: 0 20080616 10:50:03,104 INFO [sqlalchemy.pool.QueuePool.0x..ac] Pool disposed. Pool size: 5 Connections in pool: 0 Current Overflow: -5 Current Checked out connections: 0 20080616 10:50:03,104 INFO [sqlalchemy.pool.QueuePool.0x..2c] Pool recreating 20080616 10:50:03,105 INFO [sqlalchemy.pool.QueuePool.0x..ac] Pool recreating This is after the app has been left for several hours (the recycle time is 3600) and happens every time. It looks like it realises that connection 8bf4ddc is old and recycles it and checks out the new connection OK. However, the second time it does this (with 91261e4) it recycles it and checks it out. But then it uses some random other connection that doesn't seem to have been checked out 9c06b0c. Even more strangely it uses another connection 9c137a4, again not checked out. Both of these are old and fail with mysql server has gone away. After this I keep getting errors like: "Can't reconnect until invalid transaction is rolled back" I'm about to delve into the pool code to try and figure it out, anyone have any ideas what might be causing this problem? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
