PDA

View Full Version : MySQL database timeout


AndrewD
08-07-2006, 10:26 AM
I've had a few users experiencing SQL errors because the connection with the database has been lost. Generally, it seems these sites have rather small settings for the mysql wait_timeout setting (a few tens of seconds rather than the more typical value in the tens of thousands of seconds) and the problem usually occurs after completing a slow process like a large file download.

Is there a simple way inside VB to detect and re-establish the database connection if it has timed out?

Is there any reason why a site would configure MySQL to have a short timeout?

Paul M
08-07-2006, 11:08 AM
IMO, The timeout should be about 180 seconds. Why anyone would set it to thousands is beyond me - that means you can have dead connections just sitting there (using up resources) for many hours.