dbManager returning expired connections
Posted: 04 Aug 2011, 04:08
Hi,
We're still getting "Last packet sent was xxxxxxx milliseconds ago" exceptions in spite of the fact that we send periodic SELECT statements to keep the connection alive.
It seems that when calling getConnection, the connections returned are from a pool, and there's no guarantee that the connection you're using for the keepalive SELECT statements will be the same ones you'll get from the login handler.
What's the workaround for this? Setting MySQL's connection timeout to a really high number is undesirable, as this would mean we would need to restart mysql every time we restart sfs2x or risk running out of connections. We use mysql for other functions on the back end that are independent of sfs2x.
We're still getting "Last packet sent was xxxxxxx milliseconds ago" exceptions in spite of the fact that we send periodic SELECT statements to keep the connection alive.
It seems that when calling getConnection, the connections returned are from a pool, and there's no guarantee that the connection you're using for the keepalive SELECT statements will be the same ones you'll get from the login handler.
What's the workaround for this? Setting MySQL's connection timeout to a really high number is undesirable, as this would mean we would need to restart mysql every time we restart sfs2x or risk running out of connections. We use mysql for other functions on the back end that are independent of sfs2x.