Skip to content

ARTEMIS-497 Prevent 10 second stalls when closing an SSL connection#480

Closed
bgutjahr wants to merge 1 commit intoapache:masterfrom
bgutjahr:close-stalls
Closed

ARTEMIS-497 Prevent 10 second stalls when closing an SSL connection#480
bgutjahr wants to merge 1 commit intoapache:masterfrom
bgutjahr:close-stalls

Conversation

@bgutjahr
Copy link
Copy Markdown
Contributor

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.

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.
@clebertsuconic
Copy link
Copy Markdown
Contributor

nice one

@mtaylor
Copy link
Copy Markdown
Contributor

mtaylor commented Apr 25, 2016

@bgutjahr Thanks!

@asfgit asfgit closed this in 00740b1 Apr 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants