You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Egiptman <gv...@inbox.ru> on 2018/05/25 08:40:45 UTC

[Artemis 2.6.0] Messages stuck in queue infinitely

I have the same problem as  here
<http://activemq.2283324.n4.nabble.com/Artemis-Messages-stuck-in-quot-Delivering-quot-state-infinitely-td4716589.html>  

Sometimes there is a situation when the queue "hang" messages. In the JMX
console, the image is as follows:
<http://activemq.2283324.n4.nabble.com/file/t379073/Queue_with_stuck_messages_in_JMX_console.jpg> 

It is evident that this queue has consumers, but messages are not consumed.
Most likely, consumers are "hung". 
If you force the JMX console to close the session or the entire connection,
an automatic reconnect will occur and the work will continue as usual.
In the configuration of the broker, the policy "slow consumer" is configured
to 10 messages per second, and also, the parameter <connection-ttl-override>
is set to 30000. However, automatically the broker does not close the "hung"
connections and they will be there for a very long time.

How to configure automatic closing of such connections?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: [Artemis 2.6.0] Messages stuck in queue infinitely

Posted by Justin Bertram <jb...@apache.org>.
The logic for detecting and dealing with slow consumers is in
org.apache.activemq.artemis.core.server.impl.QueueImpl.SlowConsumerReaperRunnable
[1].  Right now it doesn't deal with the use-case you've described.
Contributions are always welcome.


Justin

[1]
https://github.com/apache/activemq-artemis/blob/master/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java#L3472

On Mon, May 28, 2018 at 2:01 AM, Egiptman <gv...@inbox.ru> wrote:

> I have a project working on ActiveMQ. And I plan to migrate it to Artemis.
> Therefore, on the test environment, I installed Artemis and get a situation
> where the messages in one or the other queue "hang." This happens two to
> three times a day in a random order and requires manual actions.
> In this regard, it is very difficult for me to prepare a case for such a
> situation. However, in each specific case, messages begin to accumulate in
> the queue and at the same time there are consumers.
>
> With ActiveMQ, no problems arise. Instances differ only by the broker.
>
> If we talk about this particular case, then yes, in this queue, messages do
> not appear with a frequency of 10 messages per second. However, they can
> accumulate a few thousand, and no messages will be consumed.
> In my opinion, this is a sign of slow consumers.
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>

Re: [Artemis 2.6.0] Messages stuck in queue infinitely

Posted by Egiptman <gv...@inbox.ru>.
I have a project working on ActiveMQ. And I plan to migrate it to Artemis.
Therefore, on the test environment, I installed Artemis and get a situation
where the messages in one or the other queue "hang." This happens two to
three times a day in a random order and requires manual actions.
In this regard, it is very difficult for me to prepare a case for such a
situation. However, in each specific case, messages begin to accumulate in
the queue and at the same time there are consumers.

With ActiveMQ, no problems arise. Instances differ only by the broker.

If we talk about this particular case, then yes, in this queue, messages do
not appear with a frequency of 10 messages per second. However, they can
accumulate a few thousand, and no messages will be consumed.
In my opinion, this is a sign of slow consumers.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: [Artemis 2.6.0] Messages stuck in queue infinitely

Posted by Justin Bertram <jb...@apache.org>.
Are messages being added to the queue at a rate of 10 per second?  If not,
the algorithm will take that into account and it won't close consumers
because in situations like that every consumer would be disconnected with
message production slows down which is generally not desirable.

Also, consumers can be hung in terms of message consumption but can still
be sending/receiving heartbeats to/from the broker.

If your consumers are hung you need to determine why they are hung and fix
the problem.  If you think there's a bug in the implementation (which I
don't rule out) please provide some kind of test-case to reproduce the
problem.


Justin

On Fri, May 25, 2018 at 3:40 AM, Egiptman <gv...@inbox.ru> wrote:

> I have the same problem as  here
> <http://activemq.2283324.n4.nabble.com/Artemis-Messages-
> stuck-in-quot-Delivering-quot-state-infinitely-td4716589.html>
>
> Sometimes there is a situation when the queue "hang" messages. In the JMX
> console, the image is as follows:
> <http://activemq.2283324.n4.nabble.com/file/t379073/Queue_
> with_stuck_messages_in_JMX_console.jpg>
>
> It is evident that this queue has consumers, but messages are not consumed.
> Most likely, consumers are "hung".
> If you force the JMX console to close the session or the entire connection,
> an automatic reconnect will occur and the work will continue as usual.
> In the configuration of the broker, the policy "slow consumer" is
> configured
> to 10 messages per second, and also, the parameter
> <connection-ttl-override>
> is set to 30000. However, automatically the broker does not close the
> "hung"
> connections and they will be there for a very long time.
>
> How to configure automatic closing of such connections?
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>