There are times when you may need to allow more simultaneous connections to your database. Our default setting is to allow 30 connections. If you need to change the setting, however, you will need to do so within your my.cnf file. The instructions below tell you how to make the changes on your VPS or Dedicated server.
Modifying your max_user_connections setting
- Log into your server via SSH.
- Move to the /etc folder.
- Open the my.cnf file for editing usng nano, vim, or your favorite editor.
- Locate the setting similar to below:
- Change the setting to your required level. Example:
max_user_connections=50Note: that 30 is the recommended max for VPS while dedicated servers can go 60 or higher depending on RAM.
- Close out your editor, saving the changes.
Now that you have increased the max_user_connection settings your MySQL will be able to hole more simultaneous connections. Note that making this number too high can have adverse effects on the performance of the site, so tweaking to find the optimal number may be necessary.