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!

SOLVED max_user_connections my.cnf ignored?

Discussion in 'Database Discussion' started by katmai, Jan 31, 2019.

  1. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    553
    Likes Received:
    2
    Trophy Points:
    168
    Location:
    Brno, Czech Republic
    hey guys, so i have a weird issue, i am using mariadb10.2

    i have set
    max_user_connections=200 in my.cnf but upon restarting the mysql server i get the default:

    | max_user_connections | 2147483647 |

    anyone experiencing anything similar how can i get the limits to work?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Jarvis421

    Jarvis421 Member

    Joined:
    Nov 20, 2018
    Messages:
    15
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Kochi, India
    cPanel Access Level:
    Root Administrator
    Hello,

    Are you using SHOW GLOBAL or SHOW to check the value? Try running :

    Code:
    SHOW GLOBAL VARIABLES LIKE '%max_user_connections%';
     
  3. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    553
    Likes Received:
    2
    Trophy Points:
    168
    Location:
    Brno, Czech Republic
    huh you're correct however do the limits get applied?

    MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE '%max_user_connections%';
    +----------------------+-------+
    | Variable_name | Value |
    +----------------------+-------+
    | max_user_connections | 200 |
    +----------------------+-------+
    1 row in set (0.00 sec)

    SHOW VARIABLES LIKE '%max_user_connections%';
    +----------------------+------------+
    | Variable_name | Value |
    +----------------------+------------+
    | max_user_connections | 2147483647 |
    +----------------------+------------+
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    553
    Likes Received:
    2
    Trophy Points:
    168
    Location:
    Brno, Czech Republic
    what i mean by the above reply is, are the user_connections limits enforced or not?

    shouldn't the session show the global if it's set?

    • With a GLOBAL modifier, the statement displays global system variable values. These are the values used to initialize the corresponding session variables for new connections to MySQL. If a variable has no global value, no value is displayed.

    • With a SESSION modifier, the statement displays the system variable values that are in effect for the current connection. If a variable has no session value, the global value is displayed. LOCAL is a synonym for SESSION.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    553
    Likes Received:
    2
    Trophy Points:
    168
    Location:
    Brno, Czech Republic
    nevermind, now i understand after some coffee.

    logged on on a random mysql user and did show variables (the session command) and sure enough the limit is 200, so it seems like only for root the max_user_connections is set to maximum.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,005
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hi @katmai,

    Thanks for sharing the outcome. I've marked this thread as solved.
     
    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