• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question MariaDB and wp_options tables - optimize gets stuck

tkalfaoglu

Silver Pleskian
Server operating system version
AlmaLinux
Plesk version and microupdate number
Obsidian
Did anyone else notice that OPTIMIZE takes forever on wp_options tables?

I was running an
mysqlcheck --all-databases --auto-repair --verbose --optimize --skip-write-binlog
command and they always get stuck on the options tables for some reason..

A drop database;create database helps things, but why should we?

I killed the previous optimize after 5 minutes and restarted it.. still gets stuck..

Code:
MariaDB [psa]> show processlist;
+------+--------------+-----------+-------------+---------+------+---------------------------------+-------------------------------------------------------------------------+----------+
| Id   | User         | Host      | db          | Command | Time | State                           | Info                                                                    | Progress |
+------+--------------+-----------+-------------+---------+------+---------------------------------+-------------------------------------------------------------------------+----------+
|    1 | system user  |           | NULL        | Daemon  | NULL | InnoDB purge coordinator        | NULL                                                                    |    0.000 |
|    2 | system user  |           | NULL        | Daemon  | NULL | InnoDB purge worker             | NULL                                                                    |    0.000 |
|    3 | system user  |           | NULL        | Daemon  | NULL | InnoDB purge worker             | NULL                                                                    |    0.000 |
|    4 | system user  |           | NULL        | Daemon  | NULL | InnoDB purge worker             | NULL                                                                    |    0.000 |
|    5 | system user  |           | NULL        | Daemon  | NULL | InnoDB shutdown handler         | NULL                                                                    |    0.000 |
|  103 | admin        | localhost | psa         | Sleep   |   10 |                                 | NULL                                                                    |    0.000 |
| 1046 | admin        | localhost | xxxx_web | Killed  |  706 | Parallel repair                 | OPTIMIZE TABLE `zzhr8WQw5_options`                                     |    0.000 |
| 1598 | admin        | localhost | psa         | Sleep   |  528 |                                 | NULL                                                                    |    0.000 |
| 2506 | admin        | localhost | yyyyy_wp | Query   |  113 | Parallel repair                 | OPTIMIZE NO_WRITE_TO_BINLOG TABLE `wp_options`                          |    0.000 |
| 2512 | admin        | localhost | psa         | Query   |    0 | Init                            | show processlist                                                        |    0.000 |
| 2657 | yyyyyy_user | localhost | yyyyyy_wp | Query   |   36 | Waiting for table metadata lock | SELECT option_name, option_value FROM wp_options WHERE autoload = 'yes' |    0.000 |
+------+--------------+-----------+-------------+---------+------+---------------------------------+-------------------------------------------------------------------------+----------+
11 rows in set (0.000 sec)

The optimize statements can run for 5 minutes or more on these databases; despite them being 7 and 62MB in size respectively for xxxx and yyyyy

PS: This is 10.3.32-MariaDB

Sorry for being off-topic.
 
Back
Top