<@U0A71G31CDV> currently i have hit with the below...
# questions-and-troubleshooting
v
@Rocky currently i have hit with the below error "112829 Error loading schema content Error Code: 1064 Reach user-level(qualifiedUser: user) connection limit, currentUserMaxConn=1024, connectionMap.size=1, connByUser.totConn=15, user.currConn=1024, node=xxx.x.xxx.xxx:9010" how can we resolve this issue without restarting the FE node's / kill processes?
r
To resolve the user-level connection limit error without restarting the FE or killing the FE process, you can use the following methods: 1. Increase the User Connection Limit You can dynamically increase the limit for the specific user. Since you are hitting a limit of 1024, you can raise it to a higher value (e.g., 2048). For StarRocks v3.x and v2.5.x+:
Copy code
sql
ALTER USER 'your_username' SET PROPERTIES ("max_user_connections" = "2048");
For older versions (v2.5 and earlier):
Copy code
sql
SET PROPERTY FOR 'your_username' 'max_user_connections' = '2048';
Note: If you cannot log in with the affected user because the limit is reached, try logging in as a different administrative user (like
root
) to run this command.
2. Automatically Clear Idle Connections If the connections are accumulating because they aren't being closed by the client, you can reduce the
wait_timeout
session variable. This tells StarRocks how many seconds to wait before closing an inactive connection.
Copy code
sql
-- Set the global wait timeout to 8 hours (28800s) or lower (e.g., 3600 for 1 hour)
SET GLOBAL wait_timeout = 28800;
This will not affect existing connections immediately but will help clean up future idle ones faster. 3. Terminate Specific Connections (If Needed) If you are strictly forbidden from "killing processes" (referring to the StarRocks service process), you can still safely terminate individual SQL connection threads (sessions) within the database to free up slots: 1. Find the connection IDs:
Copy code
sql
    SHOW PROCESSLIST;
2. Kill specific idle or long-running IDs:
Copy code
sql
    KILL <connection_id>;
4. Check Global FE Limits While your error specifically mentions the user-level limit, ensure the global FE limit (
qe_max_connection
) isn't also being approached. This is an FE configuration parameter (default is 4096 in newer versions, 1024 in older ones). If you need to change this globally without a restart, it must be a "mutable" parameter. However,
qe_max_connection
is generally not mutable and requires an FE restart to change in the
fe.conf
. Since your error points to
user.currConn
, the
ALTER USER
method above is the correct immediate fix. References • faq/operation_maintenance_faq.md • administration/management/monitoring/alert.md • administration/management/FE_configuration.md • knowledge/usage/best-practice.md • faq/loading/Loading_faq.md • administration/management/resource_management/Query_management.md
v
show processlist only shows one entry for the user and i have killed it, but still it is not changed anything
@Rocky show processlist only shows one entry for the user and i have killed it, but still it is not changed anything
r
It appears you are experiencing a known issue related to connection accounting leaks in the StarRocks Frontend (FE). In certain versions, StarRocks can fail to decrement a user's connection counter correctly (for example, after a user identity change or a forwarded request). This results in
user.currConn
staying high (e.g., 1024) even though
SHOW PROCESSLIST
or
connectionMap.size
shows few or no active connections. Since you cannot restart the FE, use the following steps to bypass the issue: 1. Increase the User Connection Limit (Primary Workaround) Because the internal counter is "leaked" and stuck at 1024, the immediate fix is to raise the limit so that new connections are allowed despite the stuck count. Log in as an administrative user (like
root
) and run:
Copy code
sql
-- Increase the limit to a very high value to bypass the "stuck" counter
ALTER USER 'your_username' SET PROPERTIES ("max_user_connections" = "10000");
Note: If your version is 2.5 or earlier, use:
SET PROPERTY FOR 'your_username' 'max_user_connections' = '10000';
2. Check All FE Nodes If your cluster has multiple FEs (e.g., a Leader and several Followers/Observers), the
SHOW PROCESSLIST
command only shows connections for the specific FE node you are currently connected to. * The error message points to a specific node:
<http://xxx.x.xxx.xxx:9010|xxx.x.xxx.xxx:9010>
. * Ensure you connect directly to the MySQL port (usually
9030
) of that specific IP address to run
SHOW PROCESSLIST
. * Alternatively, use
SHOW PROC '/global_current_queries';
(if on v3.4+) to see queries across all nodes. 3. Verify Proxy/Load Balancer Behavior If you are using a proxy (like ProxySQL or HAProxy), it might be keeping idle connections open or frequently switching users (
COM_CHANGE_USER
), which is a known trigger for this accounting bug. * Try setting
SET GLOBAL wait_timeout = 3600;
to help the FE automatically reap any truly idle connections that might not be showing up correctly in the process list. Why this happens (Technical Root Cause) This is typically caused by a bug (tracked in StarRocks GitHub #64265) where the internal map
connByUser
drifts apart from the actual active connection list. This usually occurs when sessions change users or when requests are forwarded between FEs without updating the counters correctly. Recommendation: If this occurs frequently, check your StarRocks version. This issue was addressed in recent bugfix releases (e.g., v3.1.x, v3.2.x, and v3.3.x patches from late 2024/2025). Plan an upgrade to a stable patch version to resolve the underlying leak. References • faq/operation_maintenance_faq.md • knowledge/usage/best-practice.md • knowledge/trouble_shooting/fe_deadlock_problems.md