mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRMINA-1041) WriteFuture.await() hangs when the connection is closed remotely before await is invoked
Date Tue, 23 Aug 2016 23:50:20 GMT

    [ https://issues.apache.org/jira/browse/DIRMINA-1041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15433876#comment-15433876

Emmanuel Lecharny commented on DIRMINA-1041:

Ok, it's defintively linked with the number of ephemeral ports available on my system. Here
are the default values :

$ sysctl -a | fgrep net.inet.ip.portrange
net.inet.ip.portrange.lowfirst: 1023
net.inet.ip.portrange.lowlast: 600
net.inet.ip.portrange.first: 49152
net.inet.ip.portrange.last: 65535
net.inet.ip.portrange.hifirst: 49152
net.inet.ip.portrange.hilast: 65535

Changing the {{first}} and {{hifirst}} to {{32768}}, I'm able to run the test up to 32 000

Now, that means we aren't releasing the sockets fast enough, because adding a 2 ms delay makes
the program happy. {{netstat}} does not show any used socket in {{TIME_WAIT}} state though.

> WriteFuture.await() hangs when the connection is closed remotely before await is invoked
> ----------------------------------------------------------------------------------------
>                 Key: DIRMINA-1041
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1041
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.13
>            Reporter: Gijsbert van den Brink
>         Attachments: DIRMINA1041Test.java
> When in a high throughput scenario a TCP connection is closed remotely before one of
the `await` methods on WriteFuture is invoked, the `await` method hangs.
> We've actually been seeing this issue for quite some time in our production environment
in an application that uses Apache Camel with the camel-mina2 and camel-hl7 components. I
was finally able to reproduce the issue in a unit test (see attached).

This message was sent by Atlassian JIRA

View raw message