Out of the blue one of my sites is having error establishing a database connection. It is behaving erratically. At times I can just access the Admin page and I could sign in. But when I clicked on, I got error establishing a database connection remark. And at times, I could not even get to the log in page. When I click on my site, most of the times, it works. Again, when I click on the hyperlinks or widgets, it goes blank with the same error remark. I wrote to my host server company, they got back to me a few times with suggestions. But of not much help. Then they stopped replying my mail for more than a day now. I am still waiting for their solution. I just want to know, Is it something wrong with my wp-config .php file or MySQL (which I think I've got it fixed.) Or is it the host database server is down? Please enlighten me.
If this is intermittent, it sounds like your site is hitting the servers max_user_connections or the server itself is hitting its max_connections.
Yes, you are correct. The last couple days there was a massive traffic to my site and I have this error establishing a database connection.