Title: Intermittent &#8216;Error establishing database connection&#8217;
Last modified: September 4, 2023

---

# Intermittent ‘Error establishing database connection’

 *  [AzureDesigns](https://wordpress.org/support/users/azuredesigns/)
 * (@azuredesigns)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/intermittent-error-establishing-database-connection/)
 * Please can someone assist? I’m getting an error but it’s intermittent when I 
   try and edit a product. The error is ‘Error establishing database connection’,
   when this appears I click on the browser back arrow and then I can edit. 
   I have
   done the following to try and resolve the issue1 – Database credentials are correct:
   Checed wp-config.php for correct Database name, Database username, Database password,
   Database server. All is in order here2 – Repair and optimise database – done 
   and no errors found3 – I have checked that the database is pointing to the web
   host, which it is. 4 – Check database server – successful. Server has enough 
   connections. 5 – Check if plugins are the problem. Deactivated all plugins except
   WooCommerce and WordPress. Error still occurred. Reactivated plugins.6 – Hosting
   provider suggested I install one or both of these plugins to pick up errors, 
   Query Monitor and F12 Monitor. Query Monitor initially picked up backwpup with
   a line error so I deactivated this plugin. F12 Monitor didn’t show any errors.
   Hosting provider also mentioned.‘Error establishing a database connection means
   that the website created too many connections to it’s database at the same time.
   We have limited each database on shared servers to 10 concurrent database connections
   at the same timeAs the error is intermittent, it most likely exceeded the 10 
   concurrent database connections while you are working on the site. This will 
   especially happen when performing updates or opening several tabs to the site
   at one time. When an 11th connection is attempted, the error will occur. There
   is no way to increase this as your website is on a shared server.Ideally, the
   database connections should only last a few milliseconds,I would advise optimising
   the database so that long running/sleeping queries are properly closed/terminated.‘
   I have repaired and optimised the database.I have also installed WP Super Cache
   Today Query monitor is coming up with a Ajax:deprecated. I’m not sure what this
   means and how to fix it, but it wasn’t coming up initiallyPlease can someone 
   assist?
    -  This topic was modified 3 years, 1 month ago by [Yui](https://wordpress.org/support/users/fierevere/).
      Reason: formatting
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fintermittent-error-establishing-database-connection%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

 The topic ‘Intermittent ‘Error establishing database connection’’ is closed to 
new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [AzureDesigns](https://wordpress.org/support/users/azuredesigns/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/intermittent-error-establishing-database-connection/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
