Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

MariaDB max_user_connections

Discussion in 'Database Discussion' started by DennisMidjord, Aug 17, 2017.

Tags:
  1. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    164
    Likes Received:
    13
    Trophy Points:
    18
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    Hi,

    We have a client that somehow managed to use all 750 allowed connections to our MariaDB server. Process list: pastebin.com/ARMTJvGk

    I tried setting max_user_connections to 100 but got this error:
    ERROR 1290 (HY000): The MariaDB server is running with the --max-user-connections=0 option so it cannot execute this statement

    Is there somehow we can fix this? It's happened three times during the past 24 hours.
     
    #1 DennisMidjord, Aug 17, 2017
    Last edited by a moderator: Aug 17, 2017
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Can you verify the full contents of your /etc/my.cnf file file? Also, does a /usr/my.cnf file exist on this server?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    164
    Likes Received:
    13
    Trophy Points:
    18
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    There's not much in /etc/my.cnf. It's a pretty new server.
    There's no /usr/my.cnf file.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm not able to reproduce this issue when restarting MariaDB after adding the following value to the /etc/my.cnf file:

    max_user_connections=100

    Can you verify where you receive that error message?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. DennisMidjord

    DennisMidjord Well-Known Member

    Joined:
    Sep 27, 2016
    Messages:
    164
    Likes Received:
    13
    Trophy Points:
    18
    Location:
    Denmark
    cPanel Access Level:
    Root Administrator
    Hi,

    I used the SET GLOBAL max_user_connections = 100; command. Can't it be changed on the fly? I'm not much for restarting the MySQL service as some of our clients aren't too happy about downtime, even if it's just for a few seconds :)
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,895
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    I don't believe that will work if the existing value is already at 0. This is explained on the following URL:

    https://mariadb.atlassian.net/browse/MDEV-8236

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice