KNnolwedge Blog
  • Home
  • Email Client Steps & Tips
  • WordPress Issues
    • Mail () Disabled
    • Setting up Specific Posts as Page
    • MySQL Concurrent Connection
  • VPS Plans & Upgrades
    • VPS General Issues
  • Redirect Codes
  • Zend Optimizer
  • Other .htaccess Rules
  • Home
  • Email Client Steps & Tips
  • WordPress Issues
    • Mail () Disabled
    • Setting up Specific Posts as Page
    • MySQL Concurrent Connection
  • VPS Plans & Upgrades
    • VPS General Issues
  • Redirect Codes
  • Zend Optimizer
  • Other .htaccess Rules

What is MySQL Concurrent Connection?

You might have seen where customer complaining that they are getting the error message as: max_user_connections while accessing their website. Yes, this is an intermittent issue, but once the database connections are reset, website will start working again.
​
How MySQL Concurrent Connection works and what is the limit?
​

The maximum number of concurrent MySQL connections per user is 20 (vDeck Shared Accounts). Unfortunately, this limit cannot be increased except VPS/Dedicated hosting. The limits are based per database login. The customer need to use mysql_close () to close a normal connection at the end of the script or else the session with the database will be kept open. If customers are using mysql_pconnect(), then such persistent connections are closed when the script finishes.
For example, if your visitor visits index.php, and it makes a database query to get some user details, that request might live for 250ms. You can limit how long those MySQL connections live even further by opening and closing them only when you are querying, instead of leaving it open for the duration of the script. Regarding how to set this up, need a technical review for which we do not provide any help.
Normally 20 simultaneous database connections should be sufficient. Most database connections open and close within a fraction of a second. A forum with 500 active members will rarely hit this 20 simultaneous connections. We recommend utilizing the Optimize Table feature in phpMyAdmin to improve the performance of your database. How often you should perform this task in phpMyAdmin depends on the size and usage of the database, though most databases will benefit from undergoing this optimization on a yearly basis.

​
How can one avoid the limits to be exceeded?
​The Open Source applications such as WordPress, Joomla, phpBB, Gallery need to be updated regularly with latest versions. The website owners need to monitor their website users and need to detect and suspend the abusing users. The best solution for CMS or WordPress is that the customer needs to install caching plug-ins to avoid website performing frequent calls to the database to fetch the contents.