Forums

Sporadic sqlalchemy.exc.OperationalError: MySQL Connection not available

Hello, I'm experience some really sporadic MySQL Connection errors in an always on task. Even if the workload stays unchanged, on some day they just appear, but also go away again.

You can find the trace in /var/log/alwayson-log-1541.log

One possibility is that the connection timeouts and is dropped -- in such case you may need to refactor your code so it manages connections is such a way that they are not hanging.