You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Francesco Raviglione <fr...@gmail.com> on 2021/09/02 08:20:34 UTC

Random "local-idle-timeout expired" disconnections with Qpid Proton C++

Dear all,
I am writing as I am experiencing an issue with Qpid Proton and some
specific AMQP brokers.
In particular, I am currently using Qpid Proton 0.33.0 (the C++ version) in
a project. In order to set up the client, I based my code on the examples
available in the official documentation (like
https://qpid.apache.org/releases/qpid-proton-0.33.0/proton/cpp/api/simple_recv_8cpp-example.html
).
My client should subscribe to a specific topic and then wait for new
messages (it is expected to be a "receive-only" AMQP client), which may
come at a very fast rate, but which may also not come for several minutes
or hours (and, in this case, it should remain connected to the broker
waiting for the moment in time in which new messages will come).
With some AMQP brokers (in particular, with an almost vanilla Apache
ActiveMQ version), everything is working properly, even if I do not set any
idle timeout with "co.idle_timeout(proton::duration(<some duration>));". If
I do not set a connection idle timeout, I can see my client sending to the
broker empty heartbeat messages with a periodicity of 7.5 seconds (probably
due to some settings in the broker which require this periodicity to
consider the client up and running). If, instead, I set a co.idle_timeout,
I also see the broker sending me empty heartbeat messages at a periodicity
equal to 1/4 of the idle timeout, which is what I am expecting.
However, with some other AMQP brokers (in particular, with a custom broker
based on ActiveMQ), I experience, after a completely variable amount of
time (spanning from few minutes to several hours), a disconnection, with
the error:
"amqp:resource-limit-exceeded: local-idle-timeout expired"
Setting any local idle timeout with "co.idle_timeout()" (including 100,
1000, FOREVER and several other options) does not seem to solve the issue:
the client gets randomly disconnected after a while.
As in the previous case, I can see the empty heartbeat messages from my
client to the broker every 7.5 seconds.
Do you know why this is happening? Could this be a bug in Qpid Proton 0.33?
Or could it be an issue related to how the broker manages the reception of
the heartbeats coming from my client?

Thank you very much in advance,
Francesco

Re: Random "local-idle-timeout expired" disconnections with Qpid Proton C++

Posted by Jiri Daněk <jd...@redhat.com>.
>
> In particular, I am currently using Qpid Proton 0.33.0 (the C++ version) in


My thought was to try some other versions of Qpid Proton. That is, 0.32.0
(should not be affected by PROTON-2422) and the current mainline (which
should contain fix for https://issues.apache.org/jira/browse/PROTON-2411).
Too bad that the issue cannot be reproduced quickly and reliably; that
would make this sort of debugging approach much more practical.
-- 
Mit freundlichen Grüßen / Kind regards
Jiri Daněk

Re: Random "local-idle-timeout expired" disconnections with Qpid Proton C++

Posted by Gordon Sim <gs...@redhat.com>.
Is the broker disconnecting the client with the timed out error? Or is
it the client disconnecting from the broker?

My initial thought was that
https://issues.apache.org/jira/browse/PROTON-2422 might be relevant,
but that results in heartbeats *not* being sent by proton. Did you
notice any such gap before disconnection? If not, i.e. if heartbeats
are being sent correctly but one side is still timing out, that
suggests the bug is on that side. (The fact that a vanilla broker
works would suggest that the other broker might have an issue (e.g.
older version of proton within it?), unless that is coincidental).

On Thu, Sep 2, 2021 at 9:30 AM Francesco Raviglione
<fr...@gmail.com> wrote:
>
> Dear all,
> I am writing as I am experiencing an issue with Qpid Proton and some
> specific AMQP brokers.
> In particular, I am currently using Qpid Proton 0.33.0 (the C++ version) in
> a project. In order to set up the client, I based my code on the examples
> available in the official documentation (like
> https://qpid.apache.org/releases/qpid-proton-0.33.0/proton/cpp/api/simple_recv_8cpp-example.html
> ).
> My client should subscribe to a specific topic and then wait for new
> messages (it is expected to be a "receive-only" AMQP client), which may
> come at a very fast rate, but which may also not come for several minutes
> or hours (and, in this case, it should remain connected to the broker
> waiting for the moment in time in which new messages will come).
> With some AMQP brokers (in particular, with an almost vanilla Apache
> ActiveMQ version), everything is working properly, even if I do not set any
> idle timeout with "co.idle_timeout(proton::duration(<some duration>));". If
> I do not set a connection idle timeout, I can see my client sending to the
> broker empty heartbeat messages with a periodicity of 7.5 seconds (probably
> due to some settings in the broker which require this periodicity to
> consider the client up and running). If, instead, I set a co.idle_timeout,
> I also see the broker sending me empty heartbeat messages at a periodicity
> equal to 1/4 of the idle timeout, which is what I am expecting.
> However, with some other AMQP brokers (in particular, with a custom broker
> based on ActiveMQ), I experience, after a completely variable amount of
> time (spanning from few minutes to several hours), a disconnection, with
> the error:
> "amqp:resource-limit-exceeded: local-idle-timeout expired"
> Setting any local idle timeout with "co.idle_timeout()" (including 100,
> 1000, FOREVER and several other options) does not seem to solve the issue:
> the client gets randomly disconnected after a while.
> As in the previous case, I can see the empty heartbeat messages from my
> client to the broker every 7.5 seconds.
> Do you know why this is happening? Could this be a bug in Qpid Proton 0.33?
> Or could it be an issue related to how the broker manages the reception of
> the heartbeats coming from my client?
>
> Thank you very much in advance,
> Francesco


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org