Error case - Maximum concurrent MySQL user connections

Possible solutions for maximum concurrent MySQL user connections

If you ever encounter a database error on your website in regards to too many concurrent connections, you should be made aware that our limit is set to 10 MySQL concurrent user connections. Therefore, if loading a specific script which requires a MySQL connection is called 11 times, 10 of these will go through but 1 will fail and give you a connection error. 

Prerequisites

  • Access to cPanel or

  • Access to Funio Hub

Task completion: 15 minutes

Expertise: Intermediate

Possible solutions

  • If connections are made from different sources, you should create different usernames for each script that will make an independent connection to the database.

  • You should verify if your script does 'pconnect' type connections to the database. Persistent connections could be the source of the issue. On the other hand, if you are executing multiple queries from the same software, using this type of connection could be a path to follow.

  • When the problem stems from long database queries that lock the requested table, you could look into using the InnoDB engine instead.

  • If a query is slow and is blocking a table needed by other queries, the problematic query can be killed from the phpMyAdmin interface by selecting the Status tab and the Process option. Click Kill to terminate the query.

Log in to your cPanel

Remote MySQL connection

Log in to phpMyAdmin

0 Comments

Please sign in to leave a comment.