Title: WordPress multisite exceeding database connections
Last modified: May 11, 2020

---

# WordPress multisite exceeding database connections

 *  [amsharma](https://wordpress.org/support/users/amsharma/)
 * (@amsharma)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/wordpress-multisite-exceeding-database-connections/)
 * Hi,
 * We are using WordPress 4.3 to run a few thousand websites using multisite feature.
   We use AWS hosting (Amazon Linux) for the website and AWS RDS server with MySQL
   on m4.large instance as backend. **Last few weeks we are facing issue of database(
   DB) connections exceeding 256 limit every two-three days.** As a result the websites
   stop working and we have to restart the RDS server to get all the websites running
   again. The number of users on the primary website is very low. AWS Support has
   given us some indicators but nothing substantial.
 * As WP manages all DB connections I have a few questions:
    – How can we trace 
   where the DB connections are originating from. What IP etc. – Can we trace if
   those connections are being closed. Maybe trace connections as they open and 
   get closed. – **How does WP pool DB connections.** – Can we generate some log
   of DB connections etc. – Each of the multisites uses a separate domain than the
   primary website. **How can we know how many users are using all the sites and
   total statistics for all domains**, i.e. total traffic info for all multisite
   domains. All these sites use the same MySQL server running on RDS.
 * I searched the internet but didn’t find any discussion on this or similar issue.
   
   Any other suggestions, thoughts and solutions are welcome. We do plan to upgrade
   to latest WP.
 * Thanks
    Amal
    -  This topic was modified 6 years, 1 month ago by [amsharma](https://wordpress.org/support/users/amsharma/).

Viewing 1 replies (of 1 total)

 *  [George Appiah](https://wordpress.org/support/users/gappiah/)
 * (@gappiah)
 * [6 years ago](https://wordpress.org/support/topic/wordpress-multisite-exceeding-database-connections/#post-12825444)
 * AWS RDS Performance Insights, if enabled, should give you all this data and then
   some.
 * [https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html)

Viewing 1 replies (of 1 total)

The topic ‘WordPress multisite exceeding database connections’ is closed to new 
replies.

## Tags

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

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 1 reply
 * 2 participants
 * Last reply from: [George Appiah](https://wordpress.org/support/users/gappiah/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/wordpress-multisite-exceeding-database-connections/#post-12825444)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
