Connections on the MySQL database stay open

Avatar
  • Answered
After some time editing my new wordpress site, I got an error message: Error Establishing a Database Connection.
I followed all of these advices: http://www.wpbeginner.com/wp-tutorials/how-to-fix-the-error-establishing-a-database-connection-in-wordpress/ (checked the credentials, ran a testconnection.php file, etc). It didn't fix the problem.
I got in touch with technical support: I was told there were 31 connections open, when my database is only granted 30. It is rather strange since the site in under construction and we are only two people working on it.
All the connections have been killed now, but if I connect again, they won't close and will quickly reach the limit again (I'm only guessing).

I was told I need to get in touch with a MySQL developer and optimize my database.
What could be done?

Thanks,

Zoe
Avatar
johnpaulb-imhs1
Hello Zoe, Thank you for contacting us about connections in your MySQL database staying open. I recommend following our Common WordPress Troubleshooting Techniques guide. Specifically the section on enabling WordPress debugging, it also includes guides for testing the plugins/Theme. These steps can often narrow down the cause of the problem. We are happy to help you troubleshoot your site further, but will need some additional information. What were you working on when you started getting "Error Establishing a Database Connection" messages? Do you get them all the time, or are they intermittent? Let us know if you have any further questions. Thank you, John-Paul