'Random "Error Establishing a Database Connection" occuring once every 1 - 2 weeks
I am running WordPress 5.9.3 on Ubuntu 20.04 using Apache and once every 1 - 2 weeks my website goes into a state of "Error Establishing a Database Connection".
Rebooting the server immediately fixes the error but I have not been able to identify the cause.
I don't know the exact time the last error occurred but here are the MYSQL logs covering the period.
2022-05-06T16:22:00.996887Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26-0ubuntu0.20.04.2) starting as process 504960
2022-05-06T16:22:01.079528Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-05-06T16:22:03.133723Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26-0ubuntu0.20.04.2) starting as process 504985
2022-05-06T16:22:03.213992Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-05-06T16:22:04.868275Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26-0ubuntu0.20.04.2) starting as process 505007
2022-05-06T16:22:04.958503Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-05-06T16:22:06.780278Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26-0ubuntu0.20.04.2) starting as process 505029
2022-05-06T16:22:06.865499Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-05-06T16:22:08.510855Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26-0ubuntu0.20.04.2) starting as process 505051
2022-05-06T16:22:08.611824Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-05-06T20:02:49.462864Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26-0ubuntu0.20.04.2) starting as process 756
2022-05-06T20:02:49.509926Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-05-06T20:02:50.551651Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2022-05-06T20:02:50.989221Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2022-05-06T20:02:51.026852Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2022-05-06T20:02:51.135285Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
2022-05-06T20:02:51.135600Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
2022-05-06T20:02:51.138193Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-05-06T20:02:51.138570Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-05-06T20:02:51.195997Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '127.0.0.1' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2022-05-06T20:02:51.196335Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.26-0ubuntu0.20.04.2' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu).
There has been no obvious spikes in traffic and I'm really not sure what else may be causing this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
