tags:

views:

20

answers:

2

Occasionally we're seeing an error from ASP pages:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[MySQL][MyODBC 5.00.11][MySQL] 2006 MySQL server has gone away

We're handling it the best way we can in ASP but it still crops up. I think it's more to do with the MySQL ODBC driver than the ASP code. We never see this with PHP code we also have running under the same IIS server, however PHP re-connects each time it is ran, whereas I believe the ODBC driver connects once and stays connected.

I've checked the settings in the driver but there doesn't seem to be anything I can change to help mitigate the problem.

Can anyone explain why this is happening and how to reduce the number of times it happens?

A: 

Check this link which gives few causes for this error. Hope this will help you -

http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

Sachin Shanbhag
Thanks, but as I mentioned I believe this is an ODBC/ASP error rather than something on the MySQL server's side.
digitala
A: 

Not sure about ASP, but in Java/Tomcat/DBCP we have ability to stick a simple test statement (such as SELECT 1) in connection pools before actually getting the connection. Maybe there is something similar in ASP, too?

mindas