Wordpress database keeps losing connecting since moving to London Host

  • Posted July 21, 2014

Hi all,

Since taking a snapshot and moving to the new London host via the guide my website keeps losing connection to the wordpress database. A quick restart of the server fixes this,

Any ideas? I’ve had to move it back to Amsterdam for now.



did you find what was the problem? i’m having the exact same issue in lon1. it says:“cannot connect to the database” - and after reboot its fine again. my droplet is 10 days old, and just recently been indexed by search engines so i’m pretty sure it is not running out of memory.

Submit an 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.

I’m having the same problem. I asked my son who is a server expert and he checked the apache logs and mysql logs and said “The problem seems like it is mysql consuming more and more memory over time and crashing, and there’s a couple options that might cause this. The most likely one is that there is a bad Wordpress plugin installed so plugins should be updated and if that doesn’t fix it then I should start searching on google for problems with the ones I am using.”

Hi! I’m experiencing the exact same issue. But I have the 1gb server size. Any suggestions on a fix?

Try adding swap to your droplet: How To Add Swap on Ubuntu 14.04.

Its the basic one with 512mb so maybe that could be it. I never noticed it crash on the same size on Amsterdam though which is still active and up and running.

What size is the droplet? It sounds like you’re running out of memory which causes MySQL to crash.

I’m not sure.

It just comes up saying “Error connecting to database”

how exactly it keeps losing connection?