Trap connection error (wsagetlasterror 10054)

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
classic12
Posts: 21
Joined: Mon 20 Apr 2009 09:48

Trap connection error (wsagetlasterror 10054)

Post by classic12 » Wed 04 Nov 2009 15:50

I have an app that is polling a database on a timer every 5 seconds. On a particular site their internet / mysql connection seems to time out fairly frequently.

When this happens I get a dialogue box with error wsagetlasterror 10054 how do I handle this error please. I have set the timeout to 120 but still get the error.

What is the best method of handling this.

I presume I stop the timer until the connection becomes live again but am not sure how to do this.

Cheers

SteveW

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 05 Nov 2009 07:08

To solve the problem try to increase the values of the following variables in the my.ini file, like this:
connect_timeout = 31536000
interactive_timeout = 31536000
wait_timeout = 31536000
net_read_timeout = 31536000
net_write_timeout = 31536000
slave_net_timeout = 31536000
max_connections = 31536000
max_user_connections = 31536000

For more information about these variables read MySQL Reference Manual.

classic12
Posts: 21
Joined: Mon 20 Apr 2009 09:48

Post by classic12 » Thu 05 Nov 2009 15:16

Thanks for the info.

I do not see these in the file do I simply add them to the my.ini file

Cheers

SteveW

Post Reply