Page 1 of 1

Timeout - Doesn't timeout in time to prevent hanging

Posted: 30.04.2007, 16:24
by mparak
Dear Friends,
My application pings the server's IP address and connects when the server responds to the ping. This way I dont have to wait for connection to fail, which takes forever to respond.
When the server is unresponsive, I would like the connection to fail (quickly) so my application can know this and proceed to deal with the issue.
The TZconnection ignores the timeout=xx parameter and hangs the application. (when server is unresponsive).
Is there a way to get the failed connect, offline status of the server to return with an error (that is usable as an event) quick enough to prevent the client application from appearing to hang.? Please advise.

Regards

MParak
Durban.

Posted: 01.05.2007, 09:06
by btrewern
Sound like this would be database specific. What database are you using?

Regards,

Ben

Posted: 02.05.2007, 07:11
by mparak
We are using MySQL. (MySAM)

Posted: 02.05.2007, 09:17
by btrewern
Shouldn't the parameter be 'connect_timeout' and should be set on the server itself.

Regards,

Ben

Posted: 03.05.2007, 07:36
by mparak
Dear Ben,

[mysql]
connect_timeout=2


This sounds like a good option to help with half of the problem. Now that we can successfully timeout after failing to connect we need to timeout when a query takes too long to respond. How do we deal with a SQL script that takes longer than it should.?

Regards

M