Closed sherlockwisdom closed 1 year ago
When a singleton object is created and reused in the code the error shows up after every transaction
[staging] peewee.OperationalError: (2006, 'MySQL server has gone away')
I think the connection needs to have a dynamic of checking and reopening closed connection.
Other possibilities involve creating the connection at every API call - would go with that while pending more feedback
Ah yes I think Peewee mentioned this behavior here. The database connection will have to be closed after every query.
When a singleton object is created and reused in the code the error shows up after every transaction
[staging] peewee.OperationalError: (2006, 'MySQL server has gone away')
I think the connection needs to have a dynamic of checking and reopening closed connection.
Other possibilities involve creating the connection at every API call - would go with that while pending more feedback