Title: Limit connection to database
Last modified: August 26, 2020

---

# Limit connection to database

 *  [robertorg2025](https://wordpress.org/support/users/robertorg2025/)
 * (@robertorg2025)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/limit-connection-to-database/)
 * Hello, recently my service provider set a limit of connection between MySQL server
   and www website.
 * The limit is at 30 connections and our website start with problem 502, 504, problem
   with connection to database, etc.
 * What are recommend me to optimazer the connections between our website and the
   MySQL server ?
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Flimit-connection-to-database%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [JNashHawkins](https://wordpress.org/support/users/jnashhawkins/)
 * (@jnashhawkins)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/limit-connection-to-database/#post-13318839)
 * I see a problem with a connection to your Nginx web server…
 * You need to ask your web host about this issue…
 * If it’s a bottleneck at the database server then you need to look into why…
 * I’d look at my plugins to see if I had too many things happening at once which
   could be triggered by a heavy (busy) pseudo cron run caused by a lack of traffic…
 * The cron runs as someone visits your website. On a slow site with few visitors,
   you might need to run cron from your control panel to stay ahead of demand.
 * Or maybe too many features being requested as your page loads. Things like RSS
   feed widgets, social media widgets, directory plugins can easily double the concurrent
   database requests.
 * It might be a case of needing to upgrade your hosting plan also.
 * Your web host can guide you through some of this.
 *  Thread Starter [robertorg2025](https://wordpress.org/support/users/robertorg2025/)
 * (@robertorg2025)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/limit-connection-to-database/#post-13318866)
 * Well, my web host just send me and information about the limit of the connection
   between www website and MySQL, but not give me how to fix the problem.
 * I read about the concurrent connections, maybe this option help me to get a momently
   solution but I don’t have idea how can I use this option.
 *  Moderator [Yui](https://wordpress.org/support/users/fierevere/)
 * (@fierevere)
 * 永子
 * [5 years, 8 months ago](https://wordpress.org/support/topic/limit-connection-to-database/#post-13319095)
 * You can only avoid hitting the limit by running less than limit-value PHP instances.
 * Using object cache can help (memcached, redis – require server support (software
   running), php extension and wordpress plugin)
 * Using caching plugin can help (once generated, static pages can be served to 
   visitors without MySQL requests)
 *  Thread Starter [robertorg2025](https://wordpress.org/support/users/robertorg2025/)
 * (@robertorg2025)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/limit-connection-to-database/#post-13319117)
 * Well, What’s plugin do you recommend me to use at this case ??
 *  Moderator [Yui](https://wordpress.org/support/users/fierevere/)
 * (@fierevere)
 * 永子
 * [5 years, 8 months ago](https://wordpress.org/support/topic/limit-connection-to-database/#post-13322472)
 * Most caching plugins work same way.
 * [https://wordpress.org/plugins/wp-super-cache/](https://wordpress.org/plugins/wp-super-cache/)
   
   and many alternatives.
 *  Thread Starter [robertorg2025](https://wordpress.org/support/users/robertorg2025/)
 * (@robertorg2025)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/limit-connection-to-database/#post-13324585)
 * Any more options to fix the problem?

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

The topic ‘Limit connection to database’ is closed to new replies.

## Tags

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

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 6 replies
 * 3 participants
 * Last reply from: [robertorg2025](https://wordpress.org/support/users/robertorg2025/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/limit-connection-to-database/#post-13324585)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
