www.webdeveloper.com
Results 1 to 3 of 3

Thread: Database error - Cannot establish a connection with database

  1. #1
    Join Date
    Nov 2012
    Posts
    2

    Database error - Cannot establish a connection with database

    Hello,
    i have the website www.mymobile.co.in.

    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.

    Regards
    MYM

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,145
    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

    eBookworm.us

  3. #3
    Join Date
    Nov 2012
    Posts
    2
    will let you know, will try the settings...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles