How can I detect a MySQL server that is unresponsive

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
mparak
Senior Boarder
Senior Boarder
Posts: 81
Joined: 12.09.2005, 06:51
Location: Durban South Africa
Contact:

How can I detect a MySQL server that is unresponsive

Post by mparak »

Dear Friends,

I need to know when the server is unresponsive, or currently executing a LONG query, before I attempt to post my records.
If I could I would write the data locally and attempt to post to the server when the server is free and responsive.
The Ping does not help me as the server that is too busy to process my SQL may still be able to respond to a ping request.

If there was an indicator that I could ask for from the server that could tell me the health of the server, I could use this to decide if the server is fit enough to accept my request.

Any help would be appreciated.

Warmest Regards
Mo
CAD RETAIL
Durban
www.cad.co.za
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post by seawolf »

At first sight I would say use pingserver property.
If that is not sufficient what about checking RowAffected property after every insert/update/delete? By this way you know if a SQL command was processed correctly or rejected.

On the other side you should undestand why that server is so stressed and improve it (if it is possible), i.e. changing hardware.
bravecobra
Junior Boarder
Junior Boarder
Posts: 29
Joined: 31.10.2005, 00:09
Location: Antwerp
Contact:

Post by bravecobra »

I use the PingServer functionality combined with a TTimer, just to keep the connection alive.
Brave Cobra
bravecobra.com
zippo
Silver Boarder
Silver Boarder
Posts: 322
Joined: 12.10.2005, 18:01
Location: Slovenia

Post by zippo »

What exactly is the difference between Ping and PingServer?
Post Reply