Title: Database Connection Error problem
Last modified: August 20, 2016

---

# Database Connection Error problem

 *  [BadKidMichael](https://wordpress.org/support/users/badkidmichael/)
 * (@badkidmichael)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/database-connection-error-problem/)
 * Hi,
 * I have recently noticed a problem on my site gagafreshnews.com
    Whenever I tweet
   links to the site it gets pretty heavy traffic, and when that happens the site
   decides to not open and after a certain time I get the Databse Connection Error.
 * I’ve contacted my host but they won’t do anything, so I really don’t know what
   to do. I also tried repairing the databse and got this:
 * wp_usermeta: 1 client is using or hasn’t closed the table properly
    wp_posts:
   4 clients are using or haven’t closed the table properly wp_options: 6 clients
   are using or haven’t closed the table properly wp_postmeta: 6 clients are using
   or haven’t closed the table properly wp_terms: 2 clients are using or haven’t
   closed the table properly wp_term_taxonomy: 4 clients are using or haven’t closed
   the table properly wp_term_relationships: 4 clients are using or haven’t closed
   the table properly
 * Does this have anything to do with my problem? And if yes, how can I fix it?
 * Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [cubecolour](https://wordpress.org/support/users/numeeja/)
 * (@numeeja)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/database-connection-error-problem/#post-3080887)
 * It sounds like your hosting may not be up to the job of serving the volume of
   traffic your tweets are generating, so a higher level account may be better. 
   Are you using a caching plugin such as w3 total cache? if not you might want 
   to consider using one.
 * Have you checked how many db queries are used by each page load? If this number
   is excessive you may be able to reduce them by looking at whether any plugin 
   or other code can be replaced or optimised.
 *  [s_ha_dum](https://wordpress.org/support/users/apljdi/)
 * (@apljdi)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/database-connection-error-problem/#post-3080889)
 * It isn’t related. You will see that most times you repair a working table. Do
   that several times in a row and you should see those numbers change. It is more
   or less just what it seems. Those tables were being used at the time you ran 
   the repair. You shouldn’t need to repair tables much though. Optimize, yes. Repair,
   rarely.
 * What is happening is that more people are connecting than your database can handle,
   again more or less like it seems. Tell me about your server. What is it and what
   kind of access do you have?
 * Sounds like you should probably think about caching too. Look up the WP Super
   Cache and W3 Total Cache plugins.
 *  Thread Starter [BadKidMichael](https://wordpress.org/support/users/badkidmichael/)
 * (@badkidmichael)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/database-connection-error-problem/#post-3080959)
 * I will have a play around with different plugins like that and see what I can
   do as I’m not good with cPanel etc. I’ll get back later. Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Database Connection Error problem’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [database connection error](https://wordpress.org/support/topic-tag/database-connection-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [BadKidMichael](https://wordpress.org/support/users/badkidmichael/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/database-connection-error-problem/#post-3080959)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
