From b692ca8dd0b6dc2d9d0ec42ea2b6015758265209 Mon Sep 17 00:00:00 2001 From: hanjinpeng Date: Fri, 5 Jul 2024 10:13:21 +0800 Subject: [PATCH] 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. --- bus/config-parser.c | 4 ++-- bus/system.conf.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bus/config-parser.c b/bus/config-parser.c index de9a1398..8a236fc7 100644 --- a/bus/config-parser.c +++ b/bus/config-parser.c @@ -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 diff --git a/bus/system.conf.in b/bus/system.conf.in index d2f3244b..f53504cf 100644 --- a/bus/system.conf.in +++ b/bus/system.conf.in @@ -119,9 +119,9 @@ - + - +