hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Error establishing a database connection - help plz
Reply

Forum Jump

Error establishing a database connection - help plz

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 01-15-2012, 02:29 PM
waqqasawan waqqasawan is offline
WHT Addict
 
Join Date: Dec 2009
Location: Pakistan
Posts: 134
Unhappy

Error establishing a database connection - help plz


Hi

For a few days, i'm receiving "Error in Database Connection" over almost all of my websites. I open up a link of website and there appears either an error stating "Error establishing a database connection" or a "404 page not found error".
When i refresh the page, it opens up as nothing has happened.
First i thought this could be a problem with Wordpress websites but this database connection error is appearing over websites other than Wordpress as well.

any ideas why its happening ?

thanks

__________________
Health should be our top priority RX Direct
Better search engine ranking with SEO Services



Sponsored Links
  #2  
Old 01-15-2012, 02:32 PM
waqqasawan waqqasawan is offline
WHT Addict
 
Join Date: Dec 2009
Location: Pakistan
Posts: 134
sorry i forgot to add; All these websites that are generating this error are hosted over same server.

__________________
Health should be our top priority RX Direct
Better search engine ranking with SEO Services

  #3  
Old 01-16-2012, 01:10 PM
RoseHosting RoseHosting is offline
Aspiring Evangelist
 
Join Date: Nov 2001
Posts: 445
You should check your log files (/var/log) for errors.

__________________
---=== RoseHosting.com Admin ===---
Linux Cloud Hosting - linuxcloudvps.com
Linux VPS Hosting - rosehosting.com
High Quality Linux virtual servers with lots of Guaranteed RAM and HDD space, Impeccable Service.

Sponsored Links
  #4  
Old 01-16-2012, 04:52 PM
ddrager ddrager is offline
WHT Addict
 
Join Date: Dec 2002
Location: Philadelphia, PA
Posts: 106
Usually this is caused by 'too many connections' to the database server. You can try to log in via the command prompt and then issuing the command: show processlist;

This will show the current connections to the server. If it can't connect, it should give you an error.

To fix, either reduce the amount of connections to the SQL server (using caching or something similar) or increase the number of connections MySQL is allowed to have (using max_connections in my.cnf)

Hope that points you in the right direction.

  #5  
Old 01-16-2012, 05:20 PM
waqqasawan waqqasawan is offline
WHT Addict
 
Join Date: Dec 2009
Location: Pakistan
Posts: 134
Thanks for your suggestions, i've taken up this issue with my host and they are looking into it.
I've just noticed something, another of my website that is hosted over some other server just had the same issue. Now, one thing that is common in all these websites is WordPress.
Does anyone else is having the same issues with WordPress websites ?

__________________
Health should be our top priority RX Direct
Better search engine ranking with SEO Services

  #6  
Old 01-16-2012, 05:44 PM
waqqasawan waqqasawan is offline
WHT Addict
 
Join Date: Dec 2009
Location: Pakistan
Posts: 134
Quote:
Originally Posted by razordave View Post
Usually this is caused by 'too many connections' to the database server. You can try to log in via the command prompt and then issuing the command: show processlist;

This will show the current connections to the server. If it can't connect, it should give you an error.

To fix, either reduce the amount of connections to the SQL server (using caching or something similar) or increase the number of connections MySQL is allowed to have (using max_connections in my.cnf)

Hope that points you in the right direction.
Thanks to you i realized that i had totally forgotten to use a caching plugin for a few of these websites.

The issue is still there and my host is still unable to find a reason of this. I have already told my host what RoseHosting & razordave have suggested and i hope this'll help us (me & my host) to get to the solution.

__________________
Health should be our top priority RX Direct
Better search engine ranking with SEO Services

Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wordpress: Error Establishing Database Connection 503 Instead Of 500 sOliver Hosting Security and Technology 1 08-06-2011 04:47 PM
DATABASE ERROR: CONNECTION FAILED! p-root Hosting Security and Technology 9 09-22-2010 08:25 AM
Error establishing a database connection hardjoko Hosting Security and Technology 5 03-10-2007 12:25 PM
Create a database connection to a database located on a remote server? JoJoH Programming Discussion 8 12-16-2003 03:09 AM

Related posts from TheWhir.com
Title Type Date Posted
Google Releases Hosted Database Service Cloud SQL to General Availability Web Hosting News 2014-02-12 13:46:02
Google Cloud Provides Support For Native MySQL Connections Web Hosting News 2013-11-01 14:36:06
Rackspace Adds Redis as a Service with Exceptional Cloud Services Acquisition Web Hosting News 2013-04-01 10:55:48
Samsung Ventures Backs Cloudant Database as a Service Web Hosting News 2013-02-08 14:10:26
Cloud Host Savvis Extends Cloud-Based Database Platform to European Customers Web Hosting News 2012-10-12 11:06:37


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?