MySQL ODBC error "server is gone"

Sometimes we see an error on ASP pages:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

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

We process it as best as possible in ASP, but it still appears. I think this has more to do with the MySQL ODBC driver than with ASP code. We never see this with the PHP code, which we also run on the same IIS server, however, PHP reconnects at each start, whereas I believe that the ODBC driver connects once and remains connected.

I checked the settings in the driver, but it seems I can’t change anything to help fix the problem.

Can someone explain why this happens and how to reduce the number of times this happens?

+3
source share
3 answers

Check out this link, which gives several reasons for this error. Hope this helps you -

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

0
source

Not sure about ASP, but in Java / Tomcat / DBCP we have the ability to stick to a simple test statement (e.g. SELECT 1) in connection pools until the connection is actually received. Maybe ASP also has something similar?

0
source

The problem is that the connection is disconnected. This is not a parameter that you can change at the ODBC level. I went around it, polling the connection every 10 seconds with a simple request. It supports connection.

0
source

Source: https://habr.com/ru/post/1770487/


All Articles