Close db connection in mysql check
Mysql log gets an "Aborted connection" warning every 30sec because the connection is not being closed properly. Story: 2007233 Task: 38509 Change-Id: Ied6c19f8f7ac9b81f61b84efa2f6c7a8e40c3056
This commit is contained in:
parent
ebd42eb5de
commit
1caaf4423a
@ -101,6 +101,7 @@ class MySql(checks.AgentCheck):
|
|||||||
# Metric collection
|
# Metric collection
|
||||||
self._collect_metrics(host, db, dimensions, options)
|
self._collect_metrics(host, db, dimensions, options)
|
||||||
self._collect_system_metrics(host, db, dimensions)
|
self._collect_system_metrics(host, db, dimensions)
|
||||||
|
db.close()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _get_config(instance):
|
def _get_config(instance):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user