A few days ago, Wordpress encountered an error message, and when opened, it displayed Error Establishing Database Connection.
This sentence translates to "An error occurred when establishing the database connection."
Analysis of the Cause of the Problem
The database being paused may be due to low configuration. Generally, our server defaults to needing at least 1GB of memory to start, and it also needs to host the website and database. If the website has high traffic, it may cause a surge in traffic leading to the database being paused.
After investigation, it was found that when testing the website's concurrency capabilities, the MySQL database consumed too much memory and was shut down by the Linux system. The kernel terminated the process.
Solution
The solution is simple, just restart the MySQL database service.
service mysqld restart
If the website frequently encounters this issue, consider upgrading the server configuration, increasing memory, or adding SWAP memory.