Hi to all.
I have a simple but serious problem:
I have a PC running under Linux (Debian 3.1) with the application, ad another (XP) with MySql server.
My app opens a connection and a table, and everithings works fine.
After that I disconnect the server (by unplug the lan cable).
At this point when I try to make MyConn.Ping (or any other command like Table1.Active:=True, etc. ) the application freezes, even if I put MyConn.Ping in a Try...Except statement.
Note that MyConn1.ConnectionTimeOut is set to 15 and Table.CommandTimeOut is set to 10
I've put the Ping in a timer:
Try
MyConn1.Ping;
Except
// This never happens !!!!
Caption:='Errore ' + TimeToStr(Now);
End;
Whe I reconnect the cable on the server (sometimes) the application starts goin well again...
Question is:
How can I check if the connection is REALLY connected (when .Ping seems that does not work under Linux)?
My MyDac version is 4.40.0.20 running under Kylix3.
Thank You,
Carlo
application freezes under linux/Kylix when MySql server down
-
carlotoffolon
- Posts: 5
- Joined: Thu 14 Sep 2006 14:53
Please perform the following experiment:
- place the TMyQuery component onto the form (MyQuery1);
- set the CommandTimeOut property of MyQuery1 to a small value, for example 5;
- run the application;
- connect to server;
- unplug network cable;
- execute a command by MyQuery1;
- note the query execution time.
Inform us if the error is raised and the expired time corresponds to the assigned value.
- place the TMyQuery component onto the form (MyQuery1);
- set the CommandTimeOut property of MyQuery1 to a small value, for example 5;
- run the application;
- connect to server;
- unplug network cable;
- execute a command by MyQuery1;
- note the query execution time.
Inform us if the error is raised and the expired time corresponds to the assigned value.
-
carlotoffolon
- Posts: 5
- Joined: Thu 14 Sep 2006 14:53
Hi,
I tried the experiment as you suggested
and after unplug network cable
and after execute a command by MyQuery1
the application freezes for about 15 minutes.
When I reconnect the cable on the server the application starts goin well again...
I think MyConnection.ConnectionTimeOut and MyQuery.CommandTimeout
don't work on Linux.
On Windows the same application works fine.
Any suggestions ?
Thanks in adavance
I tried the experiment as you suggested
and after unplug network cable
and after execute a command by MyQuery1
the application freezes for about 15 minutes.
When I reconnect the cable on the server the application starts goin well again...
I think MyConnection.ConnectionTimeOut and MyQuery.CommandTimeout
don't work on Linux.
On Windows the same application works fine.
Any suggestions ?
Thanks in adavance