Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Mysql auto-reconnect doesn't kick in on network interface crash.

by matija (Priest)
on Feb 04, 2009 at 14:17 UTC ( [id://741288]=note: print w/replies, xml ) Need Help??


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.

  • Comment on Re^3: Mysql auto-reconnect doesn't kick in on network interface crash.

Replies are listed 'Best First'.
Re^4: Mysql auto-reconnect doesn't kick in on network interface crash.
by Ossory (Initiate) on Feb 05, 2009 at 13:09 UTC

    Thanks for the help, everyone.

    And, matija, I think, that you are right, its time to rewrite that app using threads, since that would nullify my problem completely.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://741288]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found