1

I have a Wordpress site that loads very slowly and crash sometimes (it gives a database connection error for a few seconds and then it works again), even having very few visitors (it's basically just me configuring it and some bots).

I think it could be caused by a lack of resources (CPU and/or RAM), because in the hosting graphs I see 100% use of them sometimes (not always when it crashes, but sometimes). But before buying a bigger hosting, I want to make sure it cannot be solved by other means (maybe detecting a plugin that is slowing everything down or something like that).

I've checked the MySQL error.log and it seems to be recovering from a "XA crash" very frequently (even more frequently than the "real" crashes that I'm seeing when trying to load the website):

2022-08-10T12:41:06.210805Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30-0ubuntu0.20.04.2) starting as process 600373
2022-08-10T12:41:06.345616Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-08-10T12:41:08.541830Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-08-10T12:41:10.177045Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2022-08-10T12:41:10.207906Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2022-08-10T12:41:10.315985Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-08-10T12:41:10.316071Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-08-10T12:41:10.382922Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.30-0ubuntu0.20.04.2'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu).
2022-08-10T12:41:10.383178Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock

The apache error.log doesn't give anything "strange" (just a lot of "client denied by server configuration: /var/www/XXX/xmlrpc.php", probably from bots).

Any idea of what could be causing this or how to troubleshoot it?

I tried contacting my hosting (DigitalOcean). They sent me some generic tips to monitor the server, nothing really useful to know what specific file or plugin is slowing things down or making mysql crash.

Thanks!

migueltic
  • 113
  • 4
  • have a look [here](https://serverfault.com/questions/1091468/mysql-8-crashing-on-loop-without-specific-errors-and-with-enough-memory) for feedback about `XA crash` – ttsakpc Aug 10 '22 at 12:55
  • So the best "solution" is installing mysql tuner and trying a lot of different mysql variables/configurations? – migueltic Aug 10 '22 at 16:24
  • Additional information request, please. RAM size, # cores, any SSD or NVME devices on MySQL Host server? Post TEXT data on justpaste.it and share the links. From your SSH login root, Text results of: A) SELECT COUNT(*) FROM information_schema.tables; B) SHOW GLOBAL STATUS; after minimum 24 hours UPTIME C) SHOW GLOBAL VARIABLES; D) SHOW FULL PROCESSLIST; E) STATUS; not SHOW STATUS, just STATUS; F) complete www.MySQLTuner.pl (perl) report or similar. G) SHOW ENGINE INNODB STATUS; for server workload tuning analysis to provide suggestions. – Wilson Hauck Aug 11 '22 at 14:16
  • Welcome to ServerFault. Trying a lot of configs without knowing why will not be in your best interests. – Wilson Hauck Aug 11 '22 at 14:21

0 Answers0