mysqlconnectionprocesslist

SHOW PROCESSLIST shows only 20 connections, while server sais "has more than 'max_user_connections' active connections"


I am not what's the problem and how to look at it:

SHOW PROCESSLIST shows only 20 connections, while server sais "has more than 'max_user_connections' active connections", which is 400.

Why is that?


Solution

  • Are you sure that the error mentions max_user_connections? This is limit per individual MySQL user, not for the entire server and by default is 0, which means that every user can use all available connections. max_connections specifies the absolute number of connections MySQL can accept at one time and this is probably set to 400 on your server.

    SHOW PROCESSLIST will always show you all active connections. However maybe your client limits its output.

    You can check the server variables via SQL command show variables like 'max%connections'; which will output both settings:

    mysql> show variables like 'max%connections';
    +----------------------+-------+
    | Variable_name        | Value |
    +----------------------+-------+
    | max_connections      | 300   |
    | max_user_connections | 0     |
    +----------------------+-------+
    2 rows in set (0.00 sec)