Adjust maximum number of connections for per user

After logging into the desktop environment, it will consume a lot of dbus connections.
When starting some services (such as VNC),  there will be encounter the error of dbus user connection reaching the maximum limit.
the error log below:
```
The maximum number of active connections for UID 0 has been reached (max_connections_per_user=256)
```

Therefore, adjust the maximum connection  limit for per user appropriately  to avoid the error.
Ensure the normal operation of upper level dependent programs.
This commit is contained in:
hanjinpeng 2024-07-05 10:13:21 +08:00
parent 68637759b9
commit b692ca8dd0
2 changed files with 4 additions and 4 deletions

View file

@ -518,14 +518,14 @@ bus_config_parser_new (const DBusString *basedir,
parser->limits.pending_fd_timeout = 150000; /* 2.5 minutes */
parser->limits.max_incomplete_connections = 64;
parser->limits.max_connections_per_user = 256;
parser->limits.max_connections_per_user = 512;
parser->limits.max_containers_per_user = 16;
/* Note that max_completed_connections / max_connections_per_user
* is the number of users that would have to work together to
* DOS all the other users. The same applies to containers.
*/
parser->limits.max_completed_connections = 2048;
parser->limits.max_completed_connections = 4096;
parser->limits.max_containers = 512;
/* Similarly max_connections_per_user / max_connections_per_container
* is the number of app-containers per user that would have to work

View file

@ -119,9 +119,9 @@
<!-- <limit name="service_start_timeout">25000</limit> -->
<!-- <limit name="auth_timeout">5000</limit> -->
<!-- <limit name="pending_fd_timeout">150000</limit> -->
<!-- <limit name="max_completed_connections">2048</limit> -->
<!-- <limit name="max_completed_connections">4096</limit> -->
<!-- <limit name="max_incomplete_connections">64</limit> -->
<!-- <limit name="max_connections_per_user">256</limit> -->
<!-- <limit name="max_connections_per_user">512</limit> -->
<!-- <limit name="max_pending_service_starts">512</limit> -->
<!-- <limit name="max_names_per_connection">512</limit> -->
<!-- <limit name="max_match_rules_per_connection">512</limit> -->