The error "(pymysql.err.OperationalError) (2006, 'MySQL server has gone away (ConnectionResetError(104, 'Connection reset by peer'))')" frequently occurs during the execution of scheduled batch jobs in Azure Database for MariaDB

Mingqi Cai 0 Reputation points
2025-05-08T01:31:30.2+00:00

Occurrence Time: 1:30 AM JST

Occurred Query: (The query is one executed by the App Service at scheduled times)

TRUNCATE TABLE table_name

Reproduction:

By manually restarting the DB instance and executing the App Service function, the error is reproduced.

Inexplicable Issue:

The error does not occur every day, but rather every other day.

error-batch

Azure Database for MariaDB
Azure Database for MariaDB
An Azure managed MariaDB database service for app development and deployment.
61 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.