How to Fix D-Bus Service Failures

Abdullah Yıldız ayildiz at cse.yeditepe.edu.tr
Fri Mar 7 14:29:10 UTC 2025


Hi,

I have been experiencing an issue for a couple of days in our system,
and I suspect that D-Bus service somehow could not handle the requests
when there are many users active in the system.

When I check the system logs with journalctl -xe, I noticed that there
are some errors flagged:

Mar 05 07:46:08 compute-server xdg-desktop-por[35472]: error:
GDBus.Error:org.freedesktop.DBus.Error.LimitsExceeded: The maximum
number of active connections has been reached
Mar 05 07:46:18 compute-server dbus[1350]: [system] Failed to activate
service 'org.freedesktop.hostname1': timed out
Mar 05 07:46:24 compute-server dbus[1350]: [system] Connection has not
authenticated soon enough, closing it (auth_timeout=30000ms, elapsed:
30006ms)

...
:Mar 05 12:19:23 compute-server gnome-session[15079]:
gnome-session-binary[15079]: WARNING: Unable to inhibit system:
GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied
:Mar 05 12:20:47 compute-server gnome-session-binary[5917]: WARNING:
Unable to inhibit system:
GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Permission denied

...
Mar 06 11:16:53 compute-server dbus[1350]: [system] Connection has not
authenticated soon enough, closing it (auth_timeout=30000ms, elapsed:
30006ms)
Mar 06 11:16:53 compute-server sshd[7677]: pam_systemd(sshd:session):
Failed to create session: Connection reset by peer

This is what I observe when I check /usr/share/dbus-1/session.conf:

  <!-- the memory limits are 1G instead of say 4G because they can't
exceed 32-bit signed int max -->
  <limit name="max_incoming_bytes">1000000000</limit>
  <limit name="max_incoming_unix_fds">250000000</limit>
  <limit name="max_outgoing_bytes">1000000000</limit>
  <limit name="max_outgoing_unix_fds">250000000</limit>
  <limit name="max_message_size">1000000000</limit>
  <!-- We do not override max_message_unix_fds here since the
in-kernel
       limit is also relatively low -->
  <limit name="service_start_timeout">120000</limit>
  <limit name="auth_timeout">240000</limit>
  <limit name="pending_fd_timeout">150000</limit>
  <limit name="max_completed_connections">900</limit>
  <limit name="max_incomplete_connections">92</limit>
  <limit name="max_connections_per_user">100000</limit>
  <limit name="max_pending_service_starts">10000</limit>
  <limit name="max_names_per_connection">50000</limit>
  <limit name="max_match_rules_per_connection">50000</limit>
  <limit name="max_replies_per_connection">50000</limit>

I want to understand that overriding some of the D-Bus specific values
(as shown below) would help to fix the issue:

<busconfig>
 <!-- default for this is 900 -->
 <limit name="max_completed_connections">32768</limit>
 <!-- default for this is 92 -->
 <limit name="max_incomplete_connections">1000</limit>
 <!-- default for this is 100000 -->
 <limit name="max_connections_per_user">150000</limit>
</busconfig>

Thank you in advance.

-- 
"Bu mesaj (ve ekleri) gizli bilgi içermektedir ve sadece gönderilen kişiye 
yöneliktir. Bu e-mailin muhatabı değilseniz veya içeriği ile ilginiz yoksa, 
Yeditepe Üniversitesinin onayı olmaksızın bu mesajın okunması, 
değiştirilmesi, kopyalanması, üçüncü kişilere açıklanması, yayınlanması, 
ifşa edilmesi veya iletilmesi yasaktır. Bu mesajın gönderilmek istendiği 
kişi değilseniz (ya da bu e-posta'yı yanlışlıkla aldıysanız), lütfen 
yollayan kişiyi hemen haberdar ediniz ve mesajı sisteminizden derhal 
siliniz. E-mail iletiminin güvenli veya hatasız olduğunun garantisi 
olmadığından geç veya eksik iletim veya içerik ve bilgilerde eksiklik, 
kayıp, değişiklik veya virüs olabilir. Bu nedenle, bu mesajın iletiminden 
dolayı, Yeditepe Üniversitesi , içerikteki hata, eksiklik, doğruluğun ve 
gizliliğin ihlalinden veya bu yolla bilgi paylaşımı, iletimi, depolanması 
gibi herhangi bir kullanımından hiçbir şekilde sorumlu değildir. Bu mesajın 
içeriği yazarına ait olup, Üniversitemizin görüşlerini içermeyebilir.

Bu 
mesajın içeriğinde geçen Üniversitemizin ad veya nanıma yaratılan fikri ve 
sınai haklar Üniversitemize ait olup, maddi ve manevi tüm hakları 
saklıdır.”

“This Message (including any attachments) contains confidential 
information and is intended only for the individual named. If you are not 
the named adressee or not related with the content of this Message, you are 
forbidden to read, disseminate, distribute, copy, reproduce or modify this 
mail by Yeditepe University. Please notfy the sender immediately if you 
have received this e-mail by mistake and delete this e-mail from your 
system. E-mail transmisson can not be guaranteed to be secure or error-free 
as the mail may arrive late or incomplete or the information could be 
intercepted, corrupted, lost, destroyed, amended, , or contain viruses. 
Yeditepe University therefore does not accept liability for any errors, 
loss of integrity or confidentiality or ommissions in the contents of this 
Message or for the information transmission, reception, storage of use of 
such in any way whatsoever, which arise as a result of e-mail transmission. 
Any opinions expressed in this message are those of the author and may not 
necessarily reflect the opinions of Our University.

Copyright in documents 
created by or on behalf of our University remains vested in us, and we 
assert all of our moral and intellectual property rights."


More information about the dbus mailing list