Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Error establishing database connection



10:43 am on Jun 27, 2010 (gmt 0)

5+ Year Member

just few minutes ago I had a 2-3 minutes downtime followed by a Error establishing database connection error on my site. This frustrated me a lot. I entered the live chat of Hostgator (my host). I had a chat with one of the HG guy regarding this database error issue. He asked me to give the link where i got that error in the meantime error got fixed automatically.

I am putting here some portion of the chat with him. Please tell me was he correct on his part?

(4:35:29 AM) Shahab: hey andrew can u tell why i got the error of ERROR ESTABLISHING DATABASE CONNECTION
(4:35:54 AM) Andrew Le: Can I have the link to that error please?
(4:36:57 AM) Shahab: how come i can give a link ....site is now opening fine so won't get that error now
(4:37:46 AM) Andrew Le: In order for me to help, I need more information. I apologize for the inconvience. But where or why are you getting that error?
(4:38:57 AM) Shahab: just a few minutes ago ...when i tried to open my site it flashed me the "ERROR ESTABLISHING DATABAE CONNECTION"
(4:39:12 AM) Shahab: aren't you familiar with this.... u must be
(4:39:36 AM) Andrew Le: Yes, but I have to have the link to the error to even begin trying to figure out what you have going on.
(4:41:44 AM) Shahab: why don't you get the simple fact ......that was the error on the blog few minutes ago ....now site is opening properly then how come i can give you the link.?
(4:42:41 AM) Shahab: these kind of errors are the one which are supposed to be noticed when they are present on the site
4:43:04 AM) Shahab: not when they have passed away
(4:43:39 AM) Andrew Le: Do you see the error right now?
(4:43:45 AM) Shahab: no

He kept on saying the same thing that give me the link to the error. Finally i gave him that URL of my site and this i what he said "Your site is opening properly, i can't see the error"

Now tell me wasn't his answer the same thing what i was telling him in the chat again and again?

Please tell me was he correct on his part?



11:24 am on Jun 27, 2010 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

it could have been a whole multitude of different things. it could have been a problem with the database itself, the server it was on, a problem with the password, username, or an error in the script that was trying to connect with it. i cant see how he can hazard a guess if all he's got is that short error message.

seeing as it fixed itself it was probably some kind of server thing. if you're on shared hosting then you'd best get used to it. short periods of downtime (an occassional minute or two) are pretty normal in my experience. you can't really blame the host because there might be 200 sites sharing the same space. any one of them could suddenly take up the spare resources.


12:21 pm on Jun 27, 2010 (gmt 0)

5+ Year Member

I Agree with you Londrum!

I am quite aware of the problems in Shared hosting.

But the thing is that he was continously asking for the link to see the error even when i told him that the error is now resolved. You tell me one thing that once the error is resolved every link on the site will open properly therefore how come you can notice the error by visiting any link once the error has been resolved?

This is the thing that i was trying to make him understand!


6:57 pm on Jun 27, 2010 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

OK let's look at it another way . . . .

I have a problem.
"Show me the problem."
Here it is - no it's not here any more.
"I can't fix it if it isn't broken."

These kinds of things are a nightmare to debug, and worse for tech support who are often nowhere near the servers themselves. When a problem is persistent (Oh, I can see the problem, let me try to fix it) or consistent (whenever I click this link, it does it) it can be fixed. But if it comes and goes without apparent cause, it's really tough.

Let me offer one bit of advice, don't know if it's helpful or not. When these things come up, we put on our Sherlock Holmes caps - eliminate the impossible, and what remains must be the truth (or as close as we'll get to it.)

that was the error on the blog

It may be entirely possible the "blog" is doing something that is putting an unusual strain on the server. I have seen poorly coded applications cause an error: "the mySQL server has gone away." I would suspect, in this shared hosting environment, this blog is exceeding some limit or causing the mySQL server to crash. It comes back in a few minutes because it starts up again.

This is, of course, all speculation, but that's the first place I'd look. If your condition is consistent - "only when I do THIS" - it lends more credibility to this idea. If not, maybe it's the overall app, or maybe as lammert says, shared hosting can be extremely unreliable as you've no idea what any of the other 600 or so domains on this server are doing. Maybe stepping up to better hosting will be the only permanent solution.


11:02 pm on Jun 27, 2010 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Err . . longdrum, I meant . . . started with an L anyway . . . :-(


1:46 pm on Jun 28, 2010 (gmt 0)

5+ Year Member

Ok Rocknbil see the problem now this way!

You got some error (lets say its some database error) on your blog and because of that you contacted your hosting support.

Now imagine that the moment you entered the live chat that error got resolved somehow and your site pages started opening properly.

Now if in this case you want to know from your host support about that error and why it came to your blog, how will you proceed rocknbil? What you will tell him ?
Would you give him the links that are not showing that error now and are actually opening properly?

I gave that hosting guy the screenshot of the error too, you may check it here [virgintech.org...]
Wasn't that sufficient Rocknbil to tell about the error?


5:52 pm on Jun 28, 2010 (gmt 0)

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

What would I do? I wouldn't waste my time with support, I'd realize "it's fixed now, nothing support can do about it" and look at my blog more closely. :-)

Inherently, that error is generated by the program accessing your database, not by your host. It's no fault of the host it's not more helpful.

Featured Threads

Hot Threads This Week

Hot Threads This Month