braedon / prometheus-mysql-exporter

Prometheus MySQL Exporter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mysql connection closed without retry

liuhuiping2013 opened this issue · comments

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.

Hi @liuhuiping2013, thanks for reporting this. I'll work on getting it to automatically re-connect.

Fix released in 0.4.0.