Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 ( #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.
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
Node Status?
node history
Node Type: note [id://741288]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2014-12-27 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls