You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
calling django.db.close_old_connections at the beginning of all our task solved our problem in production, however our test suit ceased to work in CI/CD, probably because our test suit is run with ASYNC_QUEUES=False.
My solution was to patch django.db.close_old_connections in test suit so it does not trigger.
it seems the connection is lost when a Django database exception occurs.
A simple example:
def task():
User.objects.get(id=non_existent_id) # Obviously fails
except Exception:
User.objects.all().delete() # This will raise another exception : connection is closed
Similar to #216 , My worker sometimes loose the connection and must be restarted
My env :
The text was updated successfully, but these errors were encountered: