[14-Sep-2022 16:28:32 UTC] PHP Warning: mysqli_real_connect(): Error while reading greeting packet. PID=501493 in /var/www/yolosand/public/wp-includes/wp-db.php on line 1753 [14-Sep-2022 16:28:32 UTC] PHP Warning: mysqli_real_connect(): (HY000/2006): MySQL server has gone away in /var/www/yolosand/public/wp-includes/wp-db.php on line 1753 [14-Sep-2022 16:28:32 UTC] PHP Warning: mysqli_set_charset(): Error executing query in /var/www/yolosand/public/wp-includes/wp-db.php on line 884 [14-Sep-2022 16:28:36 UTC] PHP Warning: mysqli_real_connect(): (HY000/2002): Connection refused in /var/www/yolosand/public/wp-includes/wp-db.php on line 1753
Everyday the server will go down for 3-5min and then be back up. I have tried adding a swap space but that didnt solve the issue. I use the server as a multisite and have 10 websites on there.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $200 of credit to try our products over 60 days!
It sounds like your MySQL server might be crashing due to resource limitations.
I could suggest a couple of things:
Add a bit of extra RAM to the server
Add a swap file in case that you don’t have one already:
Can you confirm if MySQL goes down and then you need to manually restart it or does the issue auto-resolves?
You can examine the logs and check if the droplet is running out of memory due to the MySQL activity.