Aleksandr Zakharchenko
08/10/2026, 2:24 PMRocky
08/10/2026, 2:24 PMSHOW PROPERTY FOR 'your_service_account';
* Increase limit: If max_user_connections is set low, increase it:
sql
ALTER USER 'your_service_account' SET PROPERTIES ("max_user_connections" = "2000");
2. Verify Global Connection Limits (qe_max_connection)
StarRocks FEs have a global limit on concurrent MySQL connections. In version 3.5.x, the default is 4096.
* Check current connections: Run SHOW PROCESSLIST; or check the starrocks_fe_query_resource_group_running_queries metric.
* Check FE config: Run ADMIN SHOW CONFIG LIKE 'qe_max_connection';
* Solution: If you are hitting this limit, increase it in `fe.conf`:
properties
qe_max_connection = 8192
(Note: This requires an FE restart.)
3. Enable NIO for MySQL Service
In high-concurrency environments, the default blocking I/O for MySQL connections can cause bottlenecks in the FE. Enabling Netty-based Non-blocking I/O (NIO) improves the FE's ability to handle many concurrent connections.
* Edit `fe.conf`:
properties
mysql_service_nio_enabled = true
(Note: This requires an FE restart.)
4. Optimize Shared-Data FE Metadata Pressure
In shared-data mode, the FE performs extra work for tablet metadata management and compaction scheduling. If the FE is under heavy load (high CPU or JVM GC), connection handshakes may time out.
* Monitor FE JVM: Check for frequent "Stop the World" GC pauses.
* Publish Version Threads: If you have high-frequency ingestion, increase the threads available for version publishing in `fe.conf`:
properties
lake_publish_version_max_threads = 1024
5. Application-Side Troubleshooting
If StarRocks appears healthy, the issue likely resides in the application's connection management:
* Connection Leaks: Ensure the application always closes or returns connections to the pool in a finally block.
* Increase Pool Size: Increase the Max Pool Size in your application’s connection string (e.g., Max Pool Size=200;).
* Increase Timeout: Increase the Connection Timeout or Connect Timeout in the connection string to allow more time for a connection to become available during spikes.
Summary Checklist
1. Run SHOW PROCESSLIST to see if connections are stuck in a Sleep state (leak) or running slow queries.
2. Increase max_user_connections for the service account.
3. Set mysql_service_nio_enabled = true in fe.conf.
4. Increase the application's Max Pool Size.
References
• faq/shared_data_faq.md
• quick_start/shared-data.md