vyomakesh
08/19/2026, 7:32 AMRocky
08/19/2026, 7:32 AMsql
ALTER USER 'your_username' SET PROPERTIES ("max_user_connections" = "2048");
For older versions (v2.5 and earlier):
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.
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:
sql
SHOW PROCESSLIST;
2. Kill specific idle or long-running IDs:
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.mdvyomakesh
08/19/2026, 7:34 AMvyomakesh
08/19/2026, 7:41 AMRocky
08/19/2026, 7:42 AMuser.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:
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