[Django]-Django.db.utils.InterfaceError: (0, '')

0👍

I know, that this is not the optimal answer, but for me trying to close 3 times the connection, and then reconnecting again worked.

 try:
     connections.close_all()
 except:
     try:
         connections.close_all()
     except:
         try:
             connections.close_all()
         except:
             pass

Also tried to set CONN_MAX_AGE to None in settings.py, but that did not work.

👤sboda

Leave a comment