You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Howard Gao (JIRA)" <ji...@apache.org> on 2015/05/25 10:52:17 UTC

[jira] [Commented] (AMQ-5692) Inactivity monitor does not time out on stuck socket writes

    [ https://issues.apache.org/jira/browse/AMQ-5692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14558053#comment-14558053 ] 

Howard Gao commented on AMQ-5692:
---------------------------------

Hi,

It looks to me the soWriteTimeout way is just for this kind of issues and should be used. The inactivity monitor shouldn't do anything to terminate the connection when it is in writing status. The reason is that any connection in writing status means it is 'busy working', not inactive. What do you think?

Howard

>  Inactivity monitor does not time out on stuck socket writes
> ------------------------------------------------------------
>
>                 Key: AMQ-5692
>                 URL: https://issues.apache.org/jira/browse/AMQ-5692
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.11.1
>            Reporter: Torsten Mielke
>              Labels: broker, inactivity
>         Attachments: AMQ-5692.pl
>
>
> It is possible that a socket write is stuck but the inactivity monitor currently does not time out on a socketWrite. 
> {code:title=AbstractInactivityMonitor.java}
>     final void writeCheck() {
>         if (inSend.get()) {
>             LOG.trace("Send in progress. Skipping write check.");
>             return;
>         }
> {code}
> As a result a connection that is stuck in a tcp write will never be taken down due to inactivity. If a client misbehaves the broker will not be able to clear that connection as part of the inactivity monitoring.
> Now AMQ-2511 introduced a counter on the reachCheck() to detect it a socket read in progress really retrieves data or is stuck. 
> I propose for a similar mechanism being applied on the writeCheck() operation so that a socket write that is stuck can be detected and the connection can be closed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)