Optimize Queries Causing WP-Admin Not Loading
-
Hi,
Suddenly my website wp-admin was not loading but website was working fine. It looked like some DB issue, so I ran the “show processlist” command and saw few queries are the culprit.
MariaDB [(none)]> show processlist; +--------+------------+-----------+------------+---------+------+---------------------------------+------------------------------------------------------------------------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +--------+------------+-----------+------------+---------+------+---------------------------------+------------------------------------------------------------------------------------------------------+----------+ | 0.000 | | 566697 | jour_wp | localhost | jour_wp | Query | 1130 | Waiting for table metadata lock | OPTIMIZE TABLE wp_comments | 0.000 | | 566698 | jour_wp | localhost | jour_wp | Query | 1130 | Waiting for table level lock | OPTIMIZE TABLE wp_comments | 0.000 | | 567014 | jour_wp | localhost | jour_wp | Query | 1002 | Waiting for table metadata lock | SELECT comment_date_gmt FROM wp_comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC | 0.000 | | 567129 | jour_wp | localhost | jour_wp | Query | 957 | Waiting for table metadata lock | SELECT comment_approved, COUNT( * ) AS total FROM wp_comments WHERE comment_post_ID = 22338 GR | 0.000 |
I moved the “rvg-optimize-database” outside of plugins directly to temporary disable it. Then restarted the MySQL server, WP-Admin started loading fine but I see some optimize queries are stuck again.
MariaDB [(none)]> show processlist; +-----+------------+-----------+----------------+---------+------+---------------------------------+---------------------------------------------------------------------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +-----+------------+-----------+----------------+---------+------+---------------------------------+---------------------------------------------------------------------------------------------------+----------+ | 8 | jour_wp | localhost | jour_wp | Query | 385 | Waiting for table metadata lock | OPTIMIZE TABLE wp_litespeed_avatar | 0.000 | | 19 | jour_wp | localhost | jour_wp | Query | 385 | Waiting for table level lock | OPTIMIZE TABLE wp_litespeed_avatar | 0.000 | | 86 | root | localhost | NULL | Query | 0 | init | show processlist | 0.000 | | 720 | cyberpanel | localhost | cyberpanel | Sleep | 27 | | NULL | 0.000 | | 855 | jour_wp | localhost | jour_wp | Query | 47 | Waiting for table metadata lock | UPDATE <code>wp_litespeed_avatar</code> SET dateline=1593149359 WHERE md5='1d4ba19a941cd14f82be44d97d8e2fa3' | 0.000 |
It could be from the CRON Job? How do I fix this? My DB is around 150MB, so not so big. And I am on a VPS Linode server that I manage myself and load never goes above 0.75. So it’s not server being heavily loaded too.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Optimize Queries Causing WP-Admin Not Loading’ is closed to new replies.