Skip to content

dthoffdev/micronaut-channel-leak

Repository files navigation

This project demonstrates an issue with Micronauts DefaultHttpClient resulting in a leak of Channel objects.

  • The following log statement is generated by DefaultChannelPipeline when an exception is not handled in the channel pipeline.
  • The error that was not handled is a io.netty.handler.timeout.ReadTimeoutException. This exception is thrown by ReadTimeoutHandler.
  • The ChannelHandler that is intended to handle it is the one created and added in DefaultHttpClient.addFullHttpResponseHandler
  • If this "full http response" handler was added when the read timeout fired, it would have never made it to the tail of the pipeline.
  • This also means that the channel is not released to the pool, and also any code handling exceptions is not notified.
10:16:01.978 [nioEventLoopGroup-1-25] WARN  i.n.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.handler.timeout.ReadTimeoutException: null

About

Demonstrate Channel Leak

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published