GitHub user bgutjahr opened a pull request:
https://github.com/apache/activemq-artemis/pull/480
ARTEMIS-497 Prevent 10 second stalls when closing an SSL connection
When NettyConnection.classSSLAndChannel is called from the EventLoop,
waiting for the SSL handler to close will always take 10 seconds, because
the sslCloseFuture is from a task that is scheduled with the same
EventLoop. But since the EventLoop is a single threaded executor, it
will only be executed after the current task is completed.
Due to the single threaded nature of the EventLoop, all blocking calls
should be avoided. Therefore, I removed both awaitUninterruptibly calls
if the closing happens within an event loop tasks. As a side effect,
the annoying server log timeout warnings will go away.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bgutjahr/activemq-artemis close-stalls
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/480.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #480
----
commit 178b6ae3c5e28eb77c4389f8d61e532363875f17
Author: Bernd Gutjahr <[email protected]>
Date: 2016-04-22T06:22:41Z
ARTEMIS-497 Prevent 10 second stalls when closing an SSL connection
When NettyConnection.classSSLAndChannel is called from the EventLoop,
waiting for the SSL handler to close will always take 10 seconds, because
the sslCloseFuture is from a task that is scheduled with the same
EventLoop. But since the EventLoop is a single threaded executor, it
will only be executed after the current task is completed.
Due to the single threaded nature of the EventLoop, all blocking calls
should be avoided. Therefore, I removed both awaitUninterruptibly calls
if the closing happens within an event loop tasks. As a side effect,
the annoying server log timeout warnings will go away.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---