Long query time out

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
GuzunNicolae
Posts: 78
Joined: Wed 17 Jan 2007 14:16

Long query time out

Post by GuzunNicolae » Tue 28 Aug 2007 07:59

Hello

I am executing a long (about 1-2 mins) query and it says at some point "Lost connection with MySQL server".
I am using MyDAC 5.10.0.10. CommandTimeout = 0. The connection is local network. A lot of people is working with this MySQL server so I guess it is not a problem of the server or of the application.

Can you please point me out what can the problem be?
I thought that this problem was solved in MyDAC 5.xx and as I understood it has to reissue the last query. Or am I doing sth wrong?

Thank you for the past help. And hope that you will be able to help me now too :)

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 28 Aug 2007 08:37

Most likely this issue depends on MySQL server settings. Please see this topic of MySQL Reference Manual for more information.
GuzunNicolae wrote:I thought that this problem was solved in MyDAC 5.xx and as I understood it has to reissue the last query. Or am I doing sth wrong?
You are right, if a query failed to execute in Failover mode, MyDAC tries to reexecute it if it is possible.

GuzunNicolae
Posts: 78
Joined: Wed 17 Jan 2007 14:16

Post by GuzunNicolae » Tue 28 Aug 2007 09:03

Do I have to do sth special to run the query in Failover mode?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 28 Aug 2007 14:38

You should set the LocalFailover option of TMyConnection to True.

GuzunNicolae
Posts: 78
Joined: Wed 17 Jan 2007 14:16

Post by GuzunNicolae » Tue 28 Aug 2007 15:59

Thank you for the help
The problem was in the server wait_timeout set to 300.
Smb changed it w/o my knowledge. :) That's why I was sure it is not the server.

Post Reply