felixge/node-mysql — Issue #167: using client.ping to test connection
Author: whiteatom
Created: 2012-02-07 12:49:31+00:00
State: open

I'm sorry if this isn't the best place to go for help, but I can't seem to find anything else.

I'm having an issue where my connection to the mysql server drops after a few hours. I see that it is automatically reconnecting, but it's not calling the "USE" query that I have in my connect() function. I'm trying to use the ping function to test my connection and the call my connect function manually if the connection has timed out.

My problem is that I can't find any docs on the ping function - the callback parameters, weather it triggers an auto-reconnect itself, or if this is best practice.

Any help would be appreciated - either with this problem or pointing me to the correct place to look for help.

Cheers,

whiteatom