From 1caaf4423a9a779f56271df7db445289a76f7728 Mon Sep 17 00:00:00 2001 From: Darragh O'Reilly Date: Thu, 30 Jan 2020 12:25:30 +0000 Subject: [PATCH] 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 --- monasca_agent/collector/checks_d/mysql.py | 1 + 1 file changed, 1 insertion(+) diff --git a/monasca_agent/collector/checks_d/mysql.py b/monasca_agent/collector/checks_d/mysql.py index 9632ed73..090a2394 100644 --- a/monasca_agent/collector/checks_d/mysql.py +++ b/monasca_agent/collector/checks_d/mysql.py @@ -101,6 +101,7 @@ class MySql(checks.AgentCheck): # Metric collection self._collect_metrics(host, db, dimensions, options) self._collect_system_metrics(host, db, dimensions) + db.close() @staticmethod def _get_config(instance):