Answer the question
In order to leave comments, you need to log in
Why is mysql connection closed in django?
I have a Telegram bot in Python using Django, the bot is constantly running and after a few hours the connection to the mysql database drops. Knocks out -
(2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)")
As far as I understand, this is due to the fact that the connection to the database is opened and can be open for a long time, am I right? If so, how can I properly close the connection, or what is the best thing to do in this case? Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question