Reason for "The maximum number of pending replies per connection has been reached"?
Simon McVittie
simon.mcvittie at collabora.co.uk
Mon Jun 20 10:03:31 UTC 2016
On 15/06/16 19:05, marcin at saepia.net wrote:
> I have recently started to get the error response
>
> "The maximum number of pending replies per connection has been reached"
>
> to my method calls.
The intention of this maximum is to prevent denial-of-service by a bus
client. The dbus-daemon allows exactly one reply to each message that
expects a reply, therefore it must allocate memory every time it
receives a message that expects a reply, to record that fact. That
memory can be freed when it sees the reply, or when the process from
which it expects a reply disconnects (therefore there can be no reply
and there is no longer any point in tracking/allowing it).
To avoid denial of service, the dbus-daemon limits the amount of memory
that it is prepared to allocate on behalf of any particular client. The
limit is relatively small for the system bus, very large for the session
bus, and configurable (look for max_replies_per_connection in
/etc/dbus-1/session.conf).
> I send mostly signals on my bus, so
> there are no replies expected in 99,9999% cases
Check that your client-side D-Bus implementation is setting the
NO_REPLY_EXPECTED flag on those signals.
(Arguably, dbus-daemon should be ignoring that flag on messages whose
type is not METHOD_CALL, and in particular behaving as though it is
always set on signals, replies and errors, but perhaps it isn't doing that.)
> Is it rather meant to say to the connection owner "you have sent many
> method calls but some of destination has never replies so I will
> blacklist you" or "you have received so many method calls and never
> replied so I will blacklist you"?
The former.
--
Simon McVittie
Collabora Ltd. <http://www.collabora.com/>
More information about the dbus
mailing list