python - Flask SQL-Alchemy OperationalError -
i'm getting error message causing 500 error sporadically on site: operationalerror: (_mysql_exceptions.operationalerror) (2006, 'mysql server has gone away') i using flask sql-alchemy. after doing googling came across this: https://rapd.wordpress.com/2008/03/02/sqlalchemy-sqlerror-operationalerror-2006-mysql-server-has-gone-away/ i added these fixes: app.config['sqlalchemy_database_uri'] = 'myserverstuff' app.config['sqlalchemy_pool_size'] = 100 app.config['sqlalchemy_pool_recycle'] = 3600 db = sqlalchemy(app) sadly haven't had success this. suggestions? edit: newest_vendors = accounts.query.filter(accounts.acc_type=='vendor').order_by(accounts.created_at.desc()).limit(4).all() this happens through out functions sporadically there isn't specific spot :/ edit edit: this apache saying: root@server [~]# tail -f /usr/local/apache/logs/error_log app 4986 stderr: file "/home/admin/venv/lib/py...