in reply to Re^2: Mysql auto-reconnect doesn't kick in on network interface crash.
in thread Mysql auto-reconnect doesn't kick in on network interface crash.
I think you're approaching the problem the wrong way. Either you're not bothered by the events that gets lost when the server legitimately "goes away", or you are.
If the record are that precious, you should have some kind of a caching mechanism on your side that will read from the fifo and store the records until you can send them to the Mysql server. It could be a simple thread that stores stuff into one end of the array, while your thread takes them out from the other end.
Otherwise, don't sweat the time you lose trying to reconnect to a server that has legitimately gone away - if you can't store the stuff you're not sending to the server, the events sent while the server is down are lost, anyway.