mysql connection closed without retry
liuhuiping2013 opened this issue · comments
liuhuiping commented
i have run this app for long time, everything is well before mysql connection lost:
Traceback (most recent call last):
File "/usr/src/app/prometheus_mysql_exporter/init.py", line 44, in run_query
mysql_client.select_db(db_name)
MySQLdb._exceptions.OperationalError: (2013, 'Lost connection to MySQL server during query')
this error will never recover, unless restart the app.
Can you provide reconnection options?
thanks.
Braedon Vickers commented
Hi @liuhuiping2013, thanks for reporting this. I'll work on getting it to automatically re-connect.
Braedon Vickers commented
Fix released in 0.4.0.