Bug #104895 Performance_schema_table_handles_lost is increasing
Submitted: 9 Sep 2021 22:39 Modified: 9 Sep 2021 23:29
Reporter: jongse park Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S3 (Non-critical)
Version:5.7.16 OS:Any
Assigned to: CPU Architecture:Any

[9 Sep 2021 22:39] jongse park
Description:
Hi

I wonder that Performance_schema_table_handles_lost is getting increasing in mysql 5.7.16

select * from sys.memory_global_by_current_bytes
where event_name like '%performance_schema%' and current_count > 0;
==>
event_name current_count current_alloc current_avg_alloc high_count high_alloc high_avg_alloc
memory/performance_schema/table_handles 1024 9.06GiB 9.06MiB 1024 9.06GiB 9.06MiB
...
...

memory/performance_schema/table_handles ==> current_alloc 9.06GiB

I have 160 tables in mysql 5.7.16
variable:
table_definition_cache | 1400
table_open_cache | 2000
table_open_cache_instaces | 16
performance_schema_max_table_handles | -1

status:
performance_schema_table_handles_lost | 290679654 (increasing..)
performance_schema_table_instances_lost | 0

Can I reduce or tune memory/performance_schema/table_handles memory?
and performance_schema_table_handles_lost values?

How can I fix performance_schema_table_handles_lost values and memory using memory/performance_schema/table_handles?

Thanks.

How to repeat:
I don't know how to repeat.
Suddenly, memory/performance_schema/table_handles have occupied 9.06GiB memory and is keeping it.
[9 Sep 2021 23:29] MySQL Verification Team
Thank you for the bug report. The 5.7.16 version is quite older, current version is 5.7.35 a lot of bugs were fixed between both versions, check with 5.7.35 and if the issue is still observed provide a repeateable test case.