"Waiting for table metadata lock" after Starting Mysql Enterprise Monitor Agent

(Doc ID 2335733.1)

Last updated on DECEMBER 05, 2017

Applies to:

MySQL Server - Version 5.7 and later
MySQL Enterprise Monitor - Version 3.4 and later
Information in this document applies to any platform.

Symptoms

On : 5.7 version, Other Technical Problem

ACTUAL BEHAVIOR
---------------
Mysql takes high RAM utilization

After starting Mysql Enterprise Monitor agent version 4.0.1, The MySQL process takes high memory utilization in quick time.

Analyzing process list, the following query is locked at the process list many times:

 

mysql> SHOW FULL PROCESSLIST;
+-------+----------------+---------------------------------+------------------+-------------+--------+---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-------+----------------+---------------------------------+------------------+-------------+--------+---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

| 76620 | root | 898244-app16.solartis.com:48226 | mysql | Query | 351 | Waiting for table metadata lock | SELECT * FROM mysql.backup_progress WHERE backup_progress.backup_id > '0' AND backup_progress.current_time > '2017-10-09 04:26:59.758' ORDER BY backup_progress.current_time |
| 76653 | root | localhost | NULL | Query | 0 | starting | SHOW FULL PROCESSLIST |
| 76690 | root | 898244-app16.solartis.com:48436 | mysql | Query | 235 | Opening tables | SELECT * FROM mysql.backup_progress WHERE backup_progress.backup_id > '0' AND backup_progress.current_time > '2017-10-09 04:28:55.365' ORDER BY backup_progress.current_time |

 

From the mysql-monitor-agent.log have this error:

 

2017-11-08 04:31:55,455 ERROR com.mysql.etools.agent.collection.impl.InventoryConcentrator: com.mysql.etools.agent.collection.MysqlConnection$BadConnectionBypassException: PreparedStatementCallback; SQL [SELECT * FROM mysql.backup_progress WHERE backup_progress.backup_id > ? AND backup_progress.current_time > ? ORDER BY backup_progress.current_time]; Communications link failure



Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms