Title: Database connection error each several pages
Last modified: August 21, 2016

---

# Database connection error each several pages

 *  [romtim](https://wordpress.org/support/users/romtim/)
 * (@romtim)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-each-several-pages/)
 * Hello,
    I have got a question about the “normal” amount of MySQL queries per 
   visit. My website gets a database connection error every several page loads, 
   which forces me to refresh the page to get it loaded. That started happening 
   once I replaced our original joomla website with the new WordPress one I’ve been
   developing for months. Now that the new website gets visits, it causes database
   connection problems and a high CPU usage. Obviously thats bad for our business.
   The CPU usage is rocketing high (however im on hostgator sharing hosting account,
   and considering to go VPS, if that will solve the issue).
 * I do have google pagespeed services configured (which works like a CDN), and 
   w3 total cache with only page and browser cache enabled.
    Right now, I checked
   the mysql queries per visit with the help of p3 plugin profiler.
 * It said that I average around 100 MySQL queries per visit. Can that be the reason
   this is happening? What are your recommendations?
 * The website is [http://www.russianweek.ca](http://www.russianweek.ca)
 * THANK YOU!

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

 *  Thread Starter [romtim](https://wordpress.org/support/users/romtim/)
 * (@romtim)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-each-several-pages/#post-4406580)
 * Now I have blocked bots – crawlers – spiders and so on, to see how that goes,
   since they might have produced a huge cpu load too.
    I’m also going to disable
   Yoast WP-SEO plugin to see how that impacts. The host has blocked me again. Even
   before I started working, there was another spike. I’m so annoyed.
 *  [Undergod11](https://wordpress.org/support/users/undergod11/)
 * (@undergod11)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-each-several-pages/#post-4406581)
 * It might be one of your plugins. Some plugs are coded wrong and execute useless
   queries that affect the performance of sites.
 * Install the [plugin P3 (Plugin Performance Profiler)](http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCsQFjAA&url=http%3A%2F%2Fwordpress.org%2Fplugins%2Fp3-profiler%2F&ei=uEirUoHtAdjhoASQuoLoDg&usg=AFQjCNHMXzU-2c1h7Nje_MbUJFOEe_LA2g&bvm=bv.57967247,d.cGU)
 * This will allow you to see which plugins are slowing down your site and then 
   you can work from there… if that doesn’t work disable each plugin one by one 
   if you have too.
 *  Thread Starter [romtim](https://wordpress.org/support/users/romtim/)
 * (@romtim)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-each-several-pages/#post-4406583)
 * Hello, as I’ve said in my first post:
    “Right now, I checked the mysql queries
   per visit with the help of p3 plugin profiler.
 * It said that I average around 100 MySQL queries per visit.”
 * There is no particular plugin which is causing the load apparently…. I’m trying
   to figure out if this amount of mysql queries is normal, or not too high.
 * Also is vps a highly recommended way of hosting wordpress?
 *  [Undergod11](https://wordpress.org/support/users/undergod11/)
 * (@undergod11)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-each-several-pages/#post-4406585)
 * I get 240 queries per visit and my site is okay with speed loading. Its not as
   fast as a 10-15 query site might be but I have like 60 plugins installed. hostgator
   is slow altogether though so I would either go with another shared hosting or
   upgrade to a vps or a cheap dedicated server. Don’t spend more than 15-20 a month
   though you can find a good one for that price if you look around
 *  Thread Starter [romtim](https://wordpress.org/support/users/romtim/)
 * (@romtim)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-each-several-pages/#post-4406589)
 * Ok, so its not the MySQL queries… I still can’t figure out what causes the CPU
   problems, I have disabled google pagespeed CDN services and blocked all the bots,
   still looks like no major improvement…
 *  [Undergod11](https://wordpress.org/support/users/undergod11/)
 * (@undergod11)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-each-several-pages/#post-4406592)
 * I’m telling you its hostgator its a slow shared hosting service. you need to 
   call them and ask them why their servers are so slow.

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

The topic ‘Database connection error each several pages’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [Undergod11](https://wordpress.org/support/users/undergod11/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/database-connection-error-each-several-pages/#post-4406592)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
