Page 1 of 1

Trap connection error (wsagetlasterror 10054)

Posted: Wed 04 Nov 2009 15:50
by classic12
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

Posted: Thu 05 Nov 2009 07:08
by Dimon
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.

Posted: Thu 05 Nov 2009 15:16
by classic12
Thanks for the info.

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

Cheers

SteveW