Skip to main content

Increase the Max SQL connections per user

Comments

9 comments

  • cPanelWilliam
    Hello there! It's difficult to know whether 600 will be a high enough value for the max_connections since this would depend on the amount of traffic the site receives and the demands of the site/database. It is best to make small changes to the max_connections and monitor the site/MySQL error log to determine if further changes are needed, as making a very large increase to the value could cause the server to become unstable.
    0
  • psytanium
    Hello there! It's difficult to know whether 600 will be a high enough value for the max_connections since this would depend on the amount of traffic the site receives and the demands of the site/database. It is best to make small changes to the max_connections and monitor the site/MySQL error log to determine if further changes are needed, as making a very large increase to the value could cause the server to become unstable.

    • How can I increase the max sql connection per user ?
    • How can I know the max sql connection needed per user ?
    • Adjusting the "Max Connections" in Services > Edit SQL Configuration, is the right thing to fix the problem ?
    Thanks :)
    0
  • cPRex Jurassic Moderator
    As far as I know, there isn't a user-level option for the MySQL connections. That variable is set globally and would apply to all user accounts. In order to get that functionality, you'd need a tool like CloudLinux's MySQL Governor:
    0
  • psytanium
    Does this article help with max sql connection "per user" ?
    0
  • cPRex Jurassic Moderator
    No, there is no "per user" option for this setting in a default MySQL configuration.
    0
  • Saket Jajodia
    Anyone found any solution for this? As I am also looking for one such option?
    0
  • psytanium
    Anyone found any solution for this? As I am also looking for one such option?

    Since implementing Cloudflare 3 months ago, I didn't have a Max SQL connections error
    0
  • Saket Jajodia
    Since implementing Cloudflare 3 months ago, I didn't have a Max SQL connections error

    I already have Cloudflare and still face it 2-3 times a week
    0
  • cPRex Jurassic Moderator
    @Saket Jajodia - it's possible your server is just that busy and you may need to optimize MySQL on the system. I'd start by checking the main error log for MySQL and see if that is reporting the max connections error being reached. If so, you could increase the number of available connections through the /etc/my.cnf file on the machine.
    0

Please sign in to leave a comment.