- Documentation
Elastic Compute Service
Elastic Compute Service
Troubleshooting
Operating system issue
Linux operating system issue
How do I resolve service anomalies caused by the DBus service connection limit?
Linux operating system issue
How do I resolve service anomalies caused by the DBus service connection limit?
How do I resolve service anomalies caused by the DBus service connection limit?
In scenarios with intensive operation of system services, management components, and automated tasks, some DBus-dependent features may encounter anomalies. Examples include service startup failures, unresponsive management commands, and abnormal system component responses. When you check instance OS logs, such as by executing the sudo journalctl -u dbus command, the DBus service displays the "The maximum number of active connections for UID 0 has been reached (max_connections_per_user=256)" error message.
The DBus service limits the maximum number of concurrent DBus connections that a single user ID (UID) can establish via the max_connections_per_user parameter. When the number of concurrent connections for UID 0 (the root user) hits this limit, new DBus connection requests are rejected. In actual environments, common triggers for this limit include, but are not limited to:
- A large number of background services running as the root user in the system, with each service frequently creating DBus connections.
- Bugs in certain services may prevent timely closure of DBus connections after creation, resulting in connection leaks. The number of accumulated connections will eventually hit the limit of 256.
- Starting a large number of DBus-dependent root processes at one time creates more than 256 DBus connections in a short period of time.
- The system is in an abnormal state or experiences a retry storm.
tip
The dbus-broker daemon dynamically adjusts the value of the max_connections_per_user parameter. Therefore, the DBus connection limit issue is usually not triggered. This issue mainly occurs in operating systems that use the dbus-daemon daemon.
warning
- This solution is intended only to mitigate issues arising from insufficient DBus connections. It does not replace the troubleshooting and resolution of abnormal service or program behaviors that trigger such issues.
- If the issue occurs frequently, we recommend that you further analyze the sources of DBus connections in the system and troubleshoot potential connection leaks, abnormal retries, or unreasonable system call methods.
- Execute the following command to back up the DBus service configuration file.
- Modify the DBus service configuration file and appropriately adjust the connection limit to mitigate the issue.
- Execute the following command to open the DBus service configuration file.
- Press i to enter edit mode, and add the following configuration to the file to increase the maximum number of DBus connections for the root user to 512.
tip
We recommend that you adjust the value of the max_connections_per_user parameter based on your actual needs and workloads. Do not blindly increase the connection limit.
- Press the Esc key to exit edit mode, enter :wq, and then press Enter to save and exit the file.
- Execute the following command to restart the DBus service for the configuration to take effect.
Last updated: 2026.06.18 17:49:53