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
Trap connection error (wsagetlasterror 10054)
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.
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.