PDA

View Full Version : Staying connected to a MySQL server



fnmblot
11th October 2007, 14:06
I am having an issue staying connected to a MySQL server. On my test server, I have no trouble staying connected, but I don't think there is a timeout for inactivity. It seems that the timeout for inactivity is 60 seconds on the production server. Could anyone refer me to some code on checking to see if a connection is still active, or how to keep a connection to a MySQL server alive? Any help is greatly appreciated.

wysota
22nd November 2007, 11:39
I think you need to alter the server's configuration for that. The client can do nothing about it, at least not through the API. You can always keep the connection alive by sending fake requests, but that's not really a solution. You might search MySQL forums for keepalive solutions, I see there are some threads about it.