[Django]-Django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')

3👍

The problem solved after adding django.db.connections.close_all() in my task auto_manage

def auto_manage():
    django.db.connections.close_all()
    AutoManagementServiceV2().run()

Leave a comment