We are facing a problem with our MySQL database. It gives an error every now and then : Cannot establish a connection with the database
We thought its the server problem, hence moved to a new one with VPS and Cpanel/whm. But still we are getting the same error.
The website is made on wordpress and we went with godaddy.com now. However godaddy does not give support to VPS customers, who are one of the highest paying people (strange)
Can anyone help me out, what could be the issue?
Everytime i get this error i have to restart the MySQL service for the website to work again. Is it a problem with our comparison feature on the website, which is on AJAX.
It's hard to tell from a distance, so to speak. One thing I might check is whether you're connecting with a persistent connection or not (mysql_pconnect() if using the old MySQL extension in PHP). From what I've seen and read, if you don't get all the configuration settings just so, persistent connections can end up leaving "zombie" processes hanging around until there are no available connections left. The simplest fix in that situation is to just use mysql_connect() instead, possibly losing the (usually very small) performance gain you get with persistent connections.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks