[Bug] Matomo Database - waiting for table metadata lock
nnhiep opened this issue · comments
What happened?
Sometimes, I encounter issues with the database (waiting for table metadata lock). And data could not be written at the time the issue occurred, I had to restart the database service (MySQL). After investigation, it is related to the SQL query as below.
SELECT idaction , type , name FROM matomo_log_action WHERE ( hash = CRC32 ( ? ) AND name = ? AND type = ? ) OR ( hash = CRC32 ( ? ) AND name = ? AND type = ? ) OR ( hash = CRC32 ( ? ) AND name = ? AND type = ? ) OR ( hash = CRC32 ( ? ) AND name = ? AND type = ? )
What should happen?
What do I need to do to minimize the impact of this issue?
How can this be reproduced?
Run matomo 5.0.1
Matomo version
5.0.1
PHP version
8.3.6
Server operating system
CentOS7
What browsers are you seeing the problem on?
No response
Computer operating system
No response
Relevant log output
No response
Validations
- Read our Contributing Guidelines.
- Follow our Security Policy.
- Check that there isn't already an issue that reports the same bug to avoid creating duplicates.
- The provided steps to reproduce is a minimal reproducible of the Bug.