MySql Crashes on command truncate table wp_wfhits
-
Should I recreate the database, and tables?
Any suggestions on what else I can do to fix this?
There’s more logs as part of the mysql crash but these are some for wordfence.
Is there a bug in mysql where if you use the truncate command it crashes mysql?
I can’t find a bug report on mysql about it, so I suspect it’s just me and my database.
It’s consistent crashing every time a truncate command is on the wfhits.
I ran all the checks on the tables, no errors or warnings, and checked the config for file size or memory mismatches thinking I had things set to small, but they look ok,
The tables weren’t even that large really. It’s a small wordpress site, I only noticed it because I was working on the site, and mysql kept crashing.
Manually running the truncate command on the tables in mysql command line cause the same issue.
I have 8 sites on that server, and it’s the wfhits table that get’s truncated AND crashes mysql most often.
Any suggestions?
$ sudo cat /var/log/mysql/error.log | grep Query
Query (7f8b8c77c460): TRUNCATE TABLE wp_wc_category_lookup
2025-09-03T10:35:18.911093Z 0 [System] [MY-013951] [Server] Query (7f8b8c77c460): TRUNCATE TABLE wp_wc_category_lookup
Query (7f7fc0015620): TRUNCATE TABLE wp_wc_category_lookup
2025-09-03T15:05:10.438830Z 0 [System] [MY-013951] [Server] Query (7f7fc0015620): TRUNCATE TABLE wp_wc_category_lookup
$ sudo cat /var/log/mysql/error.log.1 | grep Query
Query (7fc8654f7890): truncate table wp_wfhits
2025-09-02T05:45:01.021991Z 0 [System] [MY-013951] [Server] Query (7fc8654f7890): truncate table wp_wfhits
Query (7f422869eae0): truncate table wp_wfhits
2025-09-02T08:33:43.348744Z 0 [System] [MY-013951] [Server] Query (7f422869eae0): truncate table wp_wfhits
Query (7f60148609e0): TRUNCATE TABLE wp_wc_category_lookup
2025-09-02T10:36:29.136741Z 0 [System] [MY-013951] [Server] Query (7f60148609e0): TRUNCATE TABLE wp_wc_category_lookup
Query (7f6dc0a508b0): truncate table wp_wfhits
2025-09-02T12:19:49.888865Z 0 [System] [MY-013951] [Server] Query (7f6dc0a508b0): truncate table wp_wfhits
Query (7fc294b61bb0): truncate table wp_wfhits
Query (7f2c0c2faab0): TRUNCATE TABLE wp_wc_category_lookup
Query (7f3068c32260): truncate table wp_wfhits
Query (7efffde8b6e0): truncate table wp_wfhits
Query (7ff6182cd700): TRUNCATE TABLE wp_wc_category_lookup
Query (7fc6e413d570): truncate table wp_wfhoover
Query (7fc6f41664d0): TRUNCATE TABLE wp_wc_category_lookup
Query (7fef80ebb7a0): truncate table wp_wfhoover
69805-Trying to get some variables.
69835-Some pointers may be invalid and cause the dump to abort.
69893:Query (7fef80ebb7a0): truncate table wp_wfhoover
69942-Connection ID (thread ID): 8700
69974-Status: NOT_KILLED
52771-Trying to get some variables.
52801-Some pointers may be invalid and cause the dump to abort.
52859:Query (7efffde8b6e0): truncate table wp_wfhits
52906-Connection ID (thread ID): 123
52937-Status: NOT_KILLED
mysql> SHOW TABLE STATUS WHERE Name=’wp_wfhits’;
Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | +———–+——–+———+———— |
wp_wfhits | InnoDB | 10 | Dynamic | 192114 | 360 | 69304320 | 0 | 21577728 | 6291456 | 420331 | 2024-03-15 18:44:08 | NULL | NULL | utf8mb3_general_ci | NULL | | |
1 row in set (0.01 sec)
mysql> CHECK TABLE wp_wfhits; +—————————–+——-+———-+———-+ |
Table | Op | Msg_type | Msg_text | +—————————–+——-+———-+———-+ | wp_wfhits | check | status | OK |
1 row in set (11.87 sec)
mysql> SELECT VERSION(); +————————-+ | VERSION() | +————————-+ | 8.0.43-0ubuntu0.22.04.1 | +————————-+ 1 row in set (0.00 sec)
| innodb_fast_shutdown | 1 | | innodb_file_per_table | ON | | innodb_log_buffer_size | 16777216 | | innodb_log_checksums | ON | | innodb_log_compressed_pages | ON | | innodb_log_file_size | 50331648 | | innodb_log_files_in_group | 2 | | innodb_log_group_home_dir | ./ | | innodb_log_spin_cpu_abs_lwm | 80 | | innodb_log_spin_cpu_pct_hwm | 50 | | innodb_log_wait_for_flush_spin_hwm | 400 | | innodb_log_write_ahead_size | 8192 | | innodb_log_writer_threads | ON | innodb_buffer_pool_chunk_size | 134217728 | | innodb_buffer_pool_dump_at_shutdown | ON | | innodb_buffer_pool_dump_now | OFF | | innodb_buffer_pool_dump_pct | 25 | | innodb_buffer_pool_filename | ib_buffer_pool | | innodb_buffer_pool_in_core_file | ON | | innodb_buffer_pool_instances | 1 | | innodb_buffer_pool_load_abort | OFF | | innodb_buffer_pool_load_at_startup | ON | | innodb_buffer_pool_load_now | OFF | | innodb_buffer_pool_size | 134217728 | | innodb_change_buffer_max_size | 25 | | innodb_change_buffering | all |
The topic ‘MySql Crashes on command truncate table wp_wfhits’ is closed to new replies.