I get this error at random times in my flask webapp hosted on pythonanywhere, it causes a 500 internal server error and it's pretty unpredictable since if occurs in random queries.
(MySQLdb.OperationalError) (2013, 'Lost connection to MySQL server during query')
I am using python 3.10 virtualenv, flask, flask-SQLAlchemy and below is a screenshot of my initialization code
Please help me resolve this issue, it's quite a hindrance since the hosted app is quite important, note that this issue does not happen locally