Lost Connection and Timeout setting...

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply

Lost Connection and Timeout setting...

Post by renato » Wed 15 Jun 2005 13:47


Im using MyDac v: and Delphi 7...

I builded an aplication that is connected into an internet database.

My internet server set the (mysql database server) timeout for 40 (sec), so... Im getting this god damn "Lost Connection bla bla" error message all the time...

I noticed, that if click ok on the error message and I try to execute the same process right way, it works just fine...

So... my question is:
could anyone help me to sort this problem out without changing the server's timeout?

(My internet provider has already told me that they cannot change it in anyway... at all... and I don't have the autonomy to move to another provider!!)

Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 15 Jun 2005 14:41

At first, read chapter A.2.8 MySQL server has gone away from MySQL Reference Manual.

What value of wait_timeout do you set at the server?


Post by Renato » Wed 15 Jun 2005 15:11

Hi Ikar,

At the server, the wait_timeout is 40... but it is an internet server!
I dont have access to change this value...

I just would like to know, if there is a way to work this problem out...

Because, everytime that I got this error message, if I repeat the process straight away, it works fine.


Im not sure, but I think that a kind of refresh or retry process happen after I click [OK]...

PS: Sorry about my english, Im in Brazil, and Im trying hard to make myself understandable... :(

Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 16 Jun 2005 10:45

Try to call each, for example 10 seconds MyConnection.Ping. Also don't use
FetchAll = False.


You are the guy!

Post by Renato » Thu 16 Jun 2005 12:03

My Brother in Arm!

Thank you soooooooooo much !
You just saved my job!


I really appreciated your help!
Long life for Ikar !



"some people say a man's made out of mud,
But a poor man's made out of muscle and blood,
Muscle and blood, skin and bones,
A mind that's weak and a back that's strong.

You load sixteen tons and what do you get?
Another day older and deeper in debt.
Saint Peter, don't you call me 'cause I can't go,
l owe my soul to the company store"


Post Reply