I'm currently getting this error in the front-end only (not inside /wp-admin):
Warning: mysqli_real_connect(): (HY000/1203): User xxx already has more than 'max_user_connections' active connections in /hermes/.../public_html/myhome/wp-includes/wp-db.php on line 1489 Warning: mysql_connect(): User xxx already has more than 'max_user_connections' active connections in /hermes/.../public_html/myhome/wp-includes/wp-db.php on line 1515 Error establishing a database connection
And I'm wondering how come this appear when I'm the only visitor? I'm using WP 4.5.
I did contact the host who was kind enough to reply as below:
Currently your website is showing 'Error establishing a database connection' because the user of the database has exceeded the concurrent connection limit for a user of a database, which is 10. This is the reason website is loads database error. The script throws the concurrent connection error when number of database connections exceed the limit set on the server. In our shared platform, we allow maximum of 10 concurrent connections to a database, which is ideal in the shared platform and it is not possible to increase this limit. The query limit for your website will be reset within couple of hours so you should be able to access the database after couple of hours. There are two cases the script loads above error, one is when there is a high traffic to the website and database concurrent connection hits the limit and second case is the database connection is not closed in the script, even for the moderate traffic the script loads concurrent connection error. To overcome this issue, you have to close the database connection immediately after fetching the required content from the database. To close the database connection you can use mysql_close() PHP function with connection parameter. This will help you to use database connection limit efficiently.
In other words, everything is fine at our end, it's a WP error.