Waiting for table metadata lock on cache_field table

Created on 20 March 2014, about 10 years ago
Updated 30 August 2023, 10 months ago

In the last couple of days I've have my connection count to MySQL go above a set threshold of 35 sometimes peaking at over 150. When this happens SHOW PROCESSLIST and SHOW ENGINE INNODB STATUS are ran so I can investigate what is causing the issue. After looking it over it appears that TRUNCATE cache_field is causing the issue. Looking over the options it appears that TRUNCATE commands need to not be ran on a live table. This means we need to rename the table before the truncate happens.

http://bugs.mysql.com/bug.php?id=61935#c368453
http://stackoverflow.com/questions/17762361/truncate-table-taking-very-l...
http://dba.stackexchange.com/questions/20600/what-can-cause-truncate-tab...
http://whatwebwhat.com/en/page/466/truncating-big-mysql-innodb-tables

πŸ› Bug report
Status

Closed: outdated

Version

9.5

Component
DatabaseΒ  β†’

Last updated 5 days ago

  • Maintained by
  • πŸ‡³πŸ‡±Netherlands @daffie
Created by

πŸ‡ΊπŸ‡ΈUnited States mikeytown2

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024