[
https://issues.apache.org/jira/browse/AMQ-9101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17680052#comment-17680052
]
Christopher L. Shannon edited comment on AMQ-9101 at 1/23/23 10:46 PM:
-----------------------------------------------------------------------
This is likely a case of there being a stuck thread read/writing from the
socket for some reason. The best thing to do to prove what is going on is to
take a thread dump of the server and see where the stuck thread is and what it
is doing because if it's not terminating then the stop is stuck on something.
If it's stuck on socket read/write then you should try setting a socket
timeout. [https://activemq.apache.org/tcp-transport-reference]
You would want to set the {{soTimeout}} and {{soWriteTimeout}} values to
something other than 0 (like 60 for 60 seconds) on the transport config.
was (Author: christopher.l.shannon):
This is likely a case of there being a stuck thread read/writing from the
socket for some reason. The best thing to do to prove what is going on is to
take a thread dump and see where the stuck thread is and what it is doing
because if it's not terminating then the stop is stuck on something.
If it's stuck on socket read/write then you should try setting a socket
timeout. [https://activemq.apache.org/tcp-transport-reference]
You would want to set the {{soTimeout}} and {{soWriteTimeout}} values to
something other than 0 (like 60 for 60 seconds) on the transport config.
> Queue is Stale - The connection to 'tcp://xxx' is taking a long time to
> shutdown
> --------------------------------------------------------------------------------
>
> Key: AMQ-9101
> URL: https://issues.apache.org/jira/browse/AMQ-9101
> Project: ActiveMQ
> Issue Type: Bug
> Components: Transport
> Affects Versions: 5.16.4, 5.17.1, 5.17.3
> Reporter: Gianandrea Rigoni
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 5.18.0, 5.17.4
>
>
> specific queue in Activemq is frozen and messages don't get processed
> multiple ip addresses keep looping in TransportConnection.java
> only stopping and starting solves
> it looks like the loop never ends despite the ip address is not showing in
> any Hawtio connections
> I understand that the client might be a slow consumer but the queue should
> not be frozen/blocked forever
> the problem has been reproduced multiple times under load but also during
> (apparently) light traffic
> we tried also to shutdown the client apps without any luck, the connection is
> not existing but the queue does not reset nor returns to and healthy state
> {code:java}
> @Override
> public void stop() throws Exception {
> // do not stop task the task runner factories (taskRunnerFactory,
> stopTaskRunnerFactory)
> // as their lifecycle is handled elsewhere
> stopAsync();
> while (!stopped.await(5, TimeUnit.SECONDS)) {
> LOG.info("The connection to '{}' is taking a long time to
> shutdown.", transport.getRemoteAddress());
> }
> }
> {code}
> any suggestions?
> best regards
--
This message was sent by Atlassian Jira
(v8.20.10#820010)