Answer the question
In order to leave comments, you need to log in
How to solve the problem of losing connection with the database?
I am writing a small server, using peewee to work with MySQL. Everything is fine, but after a while everything crashes with an error:
peewee.OperationalError: (2006, 'MySQL server has gone away')
try:
msg.save()
except peewee.OperationalError as exc:
dc.connect()
msg.save()
Answer the question
In order to leave comments, you need to log in
dev.mysql.com/doc/refman/5.5/en/server-system-vari...
see what the variable is equal to.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question