Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LEAK: ByteBuf.release() was not called before it's garbage-collected #422

Closed
madgnome opened this issue Aug 30, 2018 · 71 comments
Closed

LEAK: ByteBuf.release() was not called before it's garbage-collected #422

madgnome opened this issue Aug 30, 2018 · 71 comments
Labels
type/bug A general bug

Comments

@madgnome
Copy link

Expected behavior

No leak

Actual behavior

LEAK: ByteBuf.release() was not called before it's garbage-collected

LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.

Recent access records: 

#1: 
  io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:273)
  io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
  io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
  io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)

#2:
  io.netty.buffer.AdvancedLeakAwareByteBuf.forEachByte(AdvancedLeakAwareByteBuf.java:670)
	io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.parse(HttpObjectDecoder.java:801)
	io.netty.handler.codec.http.HttpObjectDecoder.readHeaders(HttpObjectDecoder.java:601)
	io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:227)
	io.netty.handler.codec.http.HttpServerCodec$HttpServerRequestDecoder.decode(HttpServerCodec.java:101)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)

#3:
  io.netty.buffer.AdvancedLeakAwareByteBuf.forEachByte(AdvancedLeakAwareByteBuf.java:670)
	io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.parse(HttpObjectDecoder.java:801)
	io.netty.handler.codec.http.HttpObjectDecoder.readHeaders(HttpObjectDecoder.java:581)
	io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:227)
	io.netty.handler.codec.http.HttpServerCodec$HttpServerRequestDecoder.decode(HttpServerCodec.java:101)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)

#4:
  io.netty.buffer.AdvancedLeakAwareByteBuf.getUnsignedByte(AdvancedLeakAwareByteBuf.java:160)
	io.netty.handler.codec.http.HttpObjectDecoder.skipControlCharacters(HttpObjectDecoder.java:566)
	io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:202)
	io.netty.handler.codec.http.HttpServerCodec$HttpServerRequestDecoder.decode(HttpServerCodec.java:101)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)

#5: Hint: 'reactor.left.httpCodec' will handle the message from this point. io.netty.channel.DefaultChannelPipeline.touch(DefaultChannelPipeline.java:116)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)

#6: Hint: 'DefaultChannelPipeline$HeadContext#0' will handle the message from this point. io.netty.channel.DefaultChannelPipeline.touch(DefaultChannelPipeline.java:116)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)

#7: io.netty.buffer.AdvancedLeakAwareByteBuf.writeBytes(AdvancedLeakAwareByteBuf.java:634)
	io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:345)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
	Created at: io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:331)
	io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:185)
	io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:176)
	io.netty.buffer.AbstractByteBufAllocator.ioBuffer(AbstractByteBufAllocator.java:137)
	io.netty.channel.DefaultMaxMessagesRecvByteBufAllocator$MaxMessageHandle.allocate(DefaultMaxMessagesRecvByteBufAllocator.java:114)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:147)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:646)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:581)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:460)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
	: 24 leak records were discarded because they were duplicates : 24 leak records were discarded because the leak record count is targeted to 4. Use system property io.netty.leakDetection.targetRecords to increase the limit.

Steps to reproduce

Unfortunately I have no idea how to reproduce it as this error happens randomly in our service in production.

Reactor Netty version

0.7.8

JVM version (e.g. java -version)

Java 8u181

@smaldini
Copy link
Contributor

That's pretty interesting is this a particular service, using reactor directly or via something else (spring ?)

@madgnome
Copy link
Author

🤦‍♂️ oops forgot to mention that.

It's a service using Spring Boot 2.0.4 with webflux

@violetagg
Copy link
Member

@madgnome did you run with -Dio.netty.leakDetection.level=paranoid? Also enable logging logging.level.reactor.ipc.netty=DEBUG, thus we will have more information in the stack traces with the leaked memory.

@dave-fl
Copy link

dave-fl commented Aug 31, 2018

@madgnome Are you using ReactiveAuthenticationManagerAdapter or Scheduling on elastic?

@madgnome
Copy link
Author

@violetagg haven't tried in paranoid mode this it happens in production.

@dave-fl yes we're using ReactiveAuthenticationManagerAdapter

@dave-fl
Copy link

dave-fl commented Sep 1, 2018

We began doing a more end to end style test and it failed after 11 hours. So although we got a longer (by removing elastic) test run, things still failed. Here are some of the recent leak logs.

This is on the latest snapshot and Netty 4.1.29

2018-09-01T14:38:07.83-0400 [APP/PROC/WEB/0] OUT 2018-09-01 18:38:07.831 ERROR 19 --- [server-epoll-13] o.s.w.s.adapter.HttpWebHandlerAdapter    : Unhandled failure: Connection has been closed, response already set (status=200)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:315)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     java.lang.Thread.run(Thread.java:748)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT #3:
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe$1.run(AbstractEpollChannel.java:382)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.access$300(SslHandler.java:165)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1297)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.buffer.AdvancedLeakAwareByteBuf.nioBufferCount(AdvancedLeakAwareByteBuf.java:706)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT     java.lang.Thread.run(Thread.java:748)
2018-09-01T14:38:08.71-0400 [APP/PROC/WEB/0] OUT : 4 leak records were discarded because the leak record count is targeted to 4. Use system property io.netty.leakDetection.targetRecords to increase the limit.
2018-09-01T14:38:10.34-0400 [APP/PROC/WEB/0] OUT 2018-09-01 18:38:10.342 ERROR 19 --- [server-epoll-16] o.s.w.s.adapter.HttpWebHandlerAdapter    : Unhandled failure: Connection has been closed, response already set (status=200)

2018-09-01T14:59:52.17-0400 [APP/PROC/WEB/0] OUT 2018-09-01 18:59:52.179 ERROR 19 --- [client-epoll-22] io.netty.util.ResourceLeakDetector       : LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.
2018-09-01T14:59:52.17-0400 [APP/PROC/WEB/0] OUT Recent access records:
2018-09-01T14:59:52.17-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:273)
2018-09-01T14:59:52.17-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
2018-09-01T14:59:52.17-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.http.HttpObjectDecoder$LineParser.parse(HttpObjectDecoder.java:850)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.parse(HttpObjectDecoder.java:801)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:310)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.buffer.AdvancedLeakAwareByteBuf.getUnsignedByte(AdvancedLeakAwareByteBuf.java:160)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.http.HttpObjectDecoder.skipControlCharacters(HttpObjectDecoder.java:566)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.http.HttpClientCodec$Decoder.decode(HttpClientCodec.java:202)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:410)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     java.lang.Thread.run(Thread.java:748)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT #6:
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.DefaultChannelPipeline.touch(DefaultChannelPipeline.java:116)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:310)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1297)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:410)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:310)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     java.lang.Thread.run(Thread.java:748)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.allocate(SslHandler.java:1909)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
2018-09-01T14:59:52.18-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:410)
2018-09-01T14:59:52.75-0400 [APP/PROC/WEB/0] OUT 2018-09-01 18:59:52.753 ERROR 19 --- [server-epoll-12] o.s.w.s.adapter.HttpWebHandlerAdapter    : Unhandled failure: Connection has been closed, response already set (status=200)

2018-09-01T15:04:16.17-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:16.170  WARN 19 --- [server-epoll-14] o.s.h.s.r.ReactorHttpHandlerAdapter      : Handling completed with error: Connection has been closed
2018-09-01T15:04:17.65-0400 [APP/PROC/WEB/0] OUT     at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:349) ~[reactor-core-3.1.9.BUILD-SNAPSHOT.jar!/:3.1.9.BUILD-SNAPSHOT]
2018-09-01T15:04:17.65-0400 [APP/PROC/WEB/0] OUT     at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.onComplete(FluxRetryWhen.java:164) ~[reactor-core-3.1.9.BUILD-SNAPSHOT.jar!/:3.1.9.BUILD-SNAPSHOT]
2018-09-01T15:04:17.65-0400 [APP/PROC/WEB/0] OUT     at reactor.core.publisher.MonoPeekTerminal$MonoTerminalPeekSubscriber.onComplete(MonoPeekTerminal.java:318) ~[reactor-core-3.1.9.BUILD-SNAPSHOT.jar!/:3.1.9.BUILD-SNAPSHOT]
2018-09-01T15:04:17.65-0400 [APP/PROC/WEB/0] OUT     at reactor.core.publisher.FluxPeek$PeekSubscriber.onComplete(FluxPeek.java:245) ~[reactor-core-3.1.9.BUILD-SNAPSHOT.jar!/:3.1.9.BUILD-SNAPSHOT]
2018-09-01T15:04:17.65-0400 [APP/PROC/WEB/0] OUT     at reactor.core.publisher.FluxMap$MapSubscriber.onComplete(FluxMap.java:130) ~[reactor-core-3.1.9.BUILD-SNAPSHOT.jar!/:3.1.9.BUILD-SNAPSHOT]
2018-09-01T15:04:17.65-0400 [APP/PROC/WEB/0] OUT     at reactor.core.publisher.FluxRetryPredicate$RetryPredicateSubscriber.onComplete(FluxRetryPredicate.java:107) ~[reactor-core-3.1.9.BUILD-SNAPSHOT.jar!/:3.1.9.BUILD-SNAPSHOT]
2018-09-01T15:04:17.65-0400 [APP/PROC/WEB/0] OUT     at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[netty-transport-4.1.29.Final.jar!/:4.1.29.Final]
2018-09-01T15:04:17.65-0400 [APP/PROC/WEB/0] OUT     at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) ~[netty-codec-4.1.29.Final.jar!/:4.1.29.Final]
2018-09-01T15:04:17.65-0400 [APP/PROC/WEB/0] OUT     at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253) ~[netty-transport-4.1.29.Final.jar!/:4.1.29.Final]
2018-09-01T15:04:17.65-0400 [APP/PROC/WEB/0] OUT     at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[netty-transport-4.1.29.Final.jar!/:4.1.29.Final]
2018-09-01T15:04:17.65-0400 [APP/PROC/WEB/0] OUT     at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428) ~[netty-codec-4.1.29.Final.jar!/:4.1.29.Final]
2018-09-01T15:04:18.70-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:18.709 ERROR 19 --- [server-epoll-10] o.s.w.s.adapter.HttpWebHandlerAdapter    : Unhandled failure: Connection has been closed, response already set (status=200)
2018-09-01T15:04:19.52-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:19.520 ERROR 19 --- [server-epoll-11] o.s.w.s.adapter.HttpWebHandlerAdapter    : Unhandled failure: Connection has been closed, response already set (status=200)
2018-09-01T15:04:20.04-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:20.049  WARN 19 --- [server-epoll-16] o.s.h.s.r.ReactorHttpHandlerAdapter      : Handling completed with error: Connection has been closed
2018-09-01T15:04:21.63-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:21.636 ERROR 19 --- [server-epoll-13] o.s.w.s.adapter.HttpWebHandlerAdapter    : Unhandled failure: Connection has been closed, response already set (status=200)
2018-09-01T15:04:21.63-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:21.636  WARN 19 --- [server-epoll-13] o.s.h.s.r.ReactorHttpHandlerAdapter      : Handling completed with error: Connection has been closed
2018-09-01T15:04:22.57-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:22.574  WARN 19 --- [server-epoll-12] o.s.h.s.r.ReactorHttpHandlerAdapter      : Handling completed with error: Connection has been closed
2018-09-01T15:04:25.01-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:25.011 ERROR 19 --- [server-epoll-16] o.s.w.s.adapter.HttpWebHandlerAdapter    : Unhandled failure: Connection has been closed, response already set (status=200)
2018-09-01T15:04:26.49-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:26.490  WARN 19 --- [server-epoll-16] o.s.h.s.r.ReactorHttpHandlerAdapter      : Handling completed with error: Connection has been closed
2018-09-01T15:04:26.70-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:26.706  WARN 19 --- [server-epoll-11] o.s.h.s.r.ReactorHttpHandlerAdapter      : Handling completed with error: Connection has been closed
2018-09-01T15:04:26.71-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:26.713  WARN 19 --- [server-epoll-14] o.s.h.s.r.ReactorHttpHandlerAdapter      : Handling completed with error: Connection has been closed
2018-09-01T15:04:27.28-0400 [APP/PROC/WEB/1] OUT 2018-09-01 19:04:27.284 ERROR 15 --- [server-epoll-12] o.s.w.s.adapter.HttpWebHandlerAdapter    : Unhandled failure: Connection has been closed, response already set (status=200)
2018-09-01T15:04:27.44-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:27.440  WARN 19 --- [server-epoll-16] o.s.h.s.r.ReactorHttpHandlerAdapter      : Handling completed with error: Connection has been closed
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:27.741 ERROR 19 --- [client-epoll-17] io.netty.util.ResourceLeakDetector       : LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:273)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1315)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT #3:
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     java.lang.Thread.run(Thread.java:748)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.buffer.AdvancedLeakAwareByteBuf.internalNioBuffer(AdvancedLeakAwareByteBuf.java:736)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.toByteBuffer(SslHandler.java:1439)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1297)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe$1.run(AbstractEpollChannel.java:382)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     java.lang.Thread.run(Thread.java:748)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT #5:
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.buffer.AdvancedLeakAwareByteBuf.nioBufferCount(AdvancedLeakAwareByteBuf.java:706)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler$SslEngineType$1.unwrap(SslHandler.java:217)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:315)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:176)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:808)
2018-09-01T15:04:27.74-0400 [APP/PROC/WEB/0] OUT     io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
2018-09-01T15:04:27.79-0400 [APP/PROC/WEB/0] OUT 2018-09-01 19:04:27.795 ERROR 19 --- [server-epoll-10] o.s.w.s.adapter.HttpWebHandlerAdapter    : Unhandled failure: Connection has been closed, response already set (status=200)

@violetagg
Copy link
Member

violetagg commented Sep 1, 2018

@dave-fl I cannot see in these stack traces reactor netty classes.
The recommendation here will be really helpful as we add additional hints to the Netty's leak detection mechanism (if it is not production of course). These hints will help a lot.
Also recently I fixed several possible memory leaks when the request/response fails, so if you can try Reactor Netty 0.7.9.BUILD-SNAPSHOT.
Regards,
Violeta

@dave-fl
Copy link

dave-fl commented Sep 1, 2018

I will try but it might blow up as we are running this with production style load and if we do that, we might not be able to simulate the timeouts being observed.

Note that the Cloud Gateway code is using Mono.timeout on http client, not sure if something odd could be going on here.

@violetagg
Copy link
Member

@dave-fl then instead of all reactor netty logging, enable just this location reactor.ipc.netty.channel.FluxReceive

@violetagg
Copy link
Member

@dave-fl I need the stack traces

@dave-fl
Copy link

dave-fl commented Sep 2, 2018

In an effort to try to simplify this. I'm reproducing with a single user. I can trigger things pretty easily, there is no particular unique action that is being performed that causes this to happen consistently. It's just random e.g. if I do the same action 100 times, it will happen a few times.

When it does take place there are no errors, i.e. all requests are coming back correctly from the source systems.

This may or may not be relevant but the logs are littered with this (even though no errors are taking place anywhere i.e. all requests are being properly sent and returned from source and destination systems).

2018-09-02 12:29:52.080 DEBUG 36264 --- [ctor-http-nio-1] r.i.n.http.server.HttpServerOperations   : [id: 0xcfe94cb6, L:/127.0.0.1:8090 - R:/127.0.0.1:24901] Decreasing pending responses, now 0
2018-09-02 12:29:52.080 DEBUG 36264 --- [ctor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0xcfe94cb6, L:/127.0.0.1:8090 - R:/127.0.0.1:24901] FLUSH
2018-09-02 12:29:52.081 DEBUG 36264 --- [ctor-http-nio-1] r.ipc.netty.channel.ChannelOperations    : [id: 0xcfe94cb6, L:/127.0.0.1:8090 - R:/127.0.0.1:24901] Discarding inbound content
2018-09-02 12:29:52.081 DEBUG 36264 --- [ctor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0xcfe94cb6, L:/127.0.0.1:8090 - R:/127.0.0.1:24901] USER_EVENT: [Handler Terminated]
2018-09-02 12:29:52.081 DEBUG 36264 --- [ctor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0xcfe94cb6, L:/127.0.0.1:8090 - R:/127.0.0.1:24901] READ COMPLETE
2018-09-02 12:29:52.081 DEBUG 36264 --- [ctor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0xcfe94cb6, L:/127.0.0.1:8090 - R:/127.0.0.1:24901] EXCEPTION: java.io.IOException: An established connection was aborted by the software in your host machine

java.io.IOException: An established connection was aborted by the software in your host machine
	at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[na:1.8.0_144]
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[na:1.8.0_144]
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_144]
	at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[na:1.8.0_144]
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[na:1.8.0_144]
	at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1108) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.buffer.WrappedByteBuf.writeBytes(WrappedByteBuf.java:813) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.buffer.AdvancedLeakAwareByteBuf.writeBytes(AdvancedLeakAwareByteBuf.java:635) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347) ~[netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) ~[netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628) [netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563) [netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480) [netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442) [netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) [netty-common-4.1.29.Final.jar:4.1.29.Final]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]

Hopefully the below stack is useful, if you want to add more logging I can test with that as well.

2018-09-02 12:52:01.442 DEBUG 7772 --- [reactor-http-nio-1] r.ipc.netty.http.client.HttpClient       : [id: 0x6dfc389e, L:- R:somehost:443] FLUSH
2018-09-02 12:52:01.408 DEBUG 7772 --- [reactor-http-nio-3] r.ipc.netty.http.client.HttpClient       : [id: 0x5405c3bc, L:- R:somehost:443] READ: 14346B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
APP RESPONSE
+--------+-------------------------------------------------+----------------+
2018-09-02 12:52:01.444 DEBUG 7772 --- [reactor-http-nio-1] r.i.n.channel.ChannelOperationsHandler   : [id: 0x6dfc389e, L:/10. - R:somehost:443] Writing object 
2018-09-02 12:52:01.445 DEBUG 7772 --- [reactor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0x2a919b00, L:/0:0:0:0:0:0:0:0:8090] READ: [id: 0x608758dd, L:/127.0.0.1:8090 - R:/127.0.0.1:29111]
2018-09-02 12:52:01.445 DEBUG 7772 --- [reactor-http-nio-2] reactor.ipc.netty.channel.FluxReceive    : [id: 0x9e96cbfd, L:/127.0.0.1:8090 - R:/127.0.0.1:29110] Subscribing inbound receiver [pending: 0, cancelled:false, inboundDone: true]
2018-09-02 12:52:01.445 DEBUG 7772 --- [reactor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0x2a919b00, L:/0:0:0:0:0:0:0:0:8090] READ COMPLETE
2018-09-02 12:52:01.445 DEBUG 7772 --- [reactor-http-nio-1] r.i.n.channel.ChannelOperationsHandler   : [id: 0x6dfc389e, L:/10. - R:somehost:443] Writing object EmptyLastHttpContent
2018-09-02 12:52:01.445 DEBUG 7772 --- [reactor-http-nio-1] r.ipc.netty.http.client.HttpClient       : [id: 0x6dfc389e, L:/10. - R:somehost:443] WRITE: 0B
2018-09-02 12:52:01.445 DEBUG 7772 --- [reactor-http-nio-1] r.ipc.netty.http.client.HttpClient       : [id: 0x6dfc389e, L:/10. - R:somehost:443] FLUSH
2018-09-02 12:52:01.544 ERROR 7772 --- [reactor-http-nio-1] io.netty.util.ResourceLeakDetector       : LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records: 
#1:
	Hint: Buffered ByteBufHolder in Inbound Flux Queue
	io.netty.handler.codec.http.DefaultHttpContent.touch(DefaultHttpContent.java:88)
	io.netty.handler.codec.http.DefaultLastHttpContent.touch(DefaultLastHttpContent.java:88)
	io.netty.handler.codec.http.DefaultLastHttpContent.touch(DefaultLastHttpContent.java:28)
	reactor.ipc.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:324)
	reactor.ipc.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:311)
	reactor.ipc.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:605)
	reactor.ipc.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:138)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
#2:
	Hint: 'reactor.right.reactiveBridge' will handle the message from this point.
	io.netty.handler.codec.http.DefaultHttpContent.touch(DefaultHttpContent.java:88)
	io.netty.handler.codec.http.DefaultLastHttpContent.touch(DefaultLastHttpContent.java:88)
	io.netty.handler.codec.http.DefaultLastHttpContent.touch(DefaultLastHttpContent.java:28)
	io.netty.channel.DefaultChannelPipeline.touch(DefaultChannelPipeline.java:116)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
Created at:
	io.netty.buffer.SimpleLeakAwareByteBuf.unwrappedDerived(SimpleLeakAwareByteBuf.java:143)
	io.netty.buffer.SimpleLeakAwareByteBuf.readRetainedSlice(SimpleLeakAwareByteBuf.java:67)
	io.netty.buffer.AdvancedLeakAwareByteBuf.readRetainedSlice(AdvancedLeakAwareByteBuf.java:107)
	io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:305)
	io.netty.handler.codec.http.HttpClientCodec$Decoder.decode(HttpClientCodec.java:202)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
2018-09-02 12:52:01.557 DEBUG 7772 --- [reactor-http-nio-3] r.ipc.netty.http.server.HttpServer       : [id: 0x61a7dab8, L:/127.0.0.1:8090 - R:/127.0.0.1:29107] WRITE: 924B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
BUNCH OF STUFF FROM APP
+--------+-------------------------------------------------+----------------+
2018-09-02 12:52:01.801 ERROR 7772 --- [reactor-http-nio-1] io.netty.util.ResourceLeakDetector       : LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records: 
#1:
	Hint: Buffered ByteBufHolder in Inbound Flux Queue
	io.netty.handler.codec.http.DefaultHttpContent.touch(DefaultHttpContent.java:88)
	io.netty.handler.codec.http.DefaultHttpContent.touch(DefaultHttpContent.java:24)
	reactor.ipc.netty.channel.FluxReceive.onInboundNext(FluxReceive.java:324)
	reactor.ipc.netty.channel.ChannelOperations.onInboundNext(ChannelOperations.java:311)
	reactor.ipc.netty.http.client.HttpClientOperations.onInboundNext(HttpClientOperations.java:628)
	reactor.ipc.netty.channel.ChannelOperationsHandler.channelRead(ChannelOperationsHandler.java:138)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:297)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:413)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
#2:
	Hint: 'reactor.right.reactiveBridge' will handle the message from this point.
	io.netty.handler.codec.http.DefaultHttpContent.touch(DefaultHttpContent.java:88)
	io.netty.handler.codec.http.DefaultHttpContent.touch(DefaultHttpContent.java:24)
	io.netty.channel.DefaultChannelPipeline.touch(DefaultChannelPipeline.java:116)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:297)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:413)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
#3:
	io.netty.handler.codec.http.DefaultHttpContent.release(DefaultHttpContent.java:94)
	io.netty.util.ReferenceCountUtil.release(ReferenceCountUtil.java:88)
	io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:90)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:297)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:413)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
#4:
	io.netty.handler.codec.http.DefaultHttpContent.retain(DefaultHttpContent.java:70)
	io.netty.handler.codec.http.HttpContentDecoder.decode(HttpContentDecoder.java:145)
	io.netty.handler.codec.http.HttpContentDecoder.decode(HttpContentDecoder.java:46)
	io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:297)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:413)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
#5:
	Hint: 'reactor.left.decompressor' will handle the message from this point.
	io.netty.handler.codec.http.DefaultHttpContent.touch(DefaultHttpContent.java:88)
	io.netty.handler.codec.http.DefaultHttpContent.touch(DefaultHttpContent.java:24)
	io.netty.channel.DefaultChannelPipeline.touch(DefaultChannelPipeline.java:116)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:438)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
	io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:297)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:413)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
Created at:
	io.netty.buffer.SimpleLeakAwareByteBuf.unwrappedDerived(SimpleLeakAwareByteBuf.java:143)
	io.netty.buffer.SimpleLeakAwareByteBuf.readRetainedSlice(SimpleLeakAwareByteBuf.java:67)
	io.netty.buffer.AdvancedLeakAwareByteBuf.readRetainedSlice(AdvancedLeakAwareByteBuf.java:107)
	io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:345)
	io.netty.handler.codec.http.HttpClientCodec$Decoder.decode(HttpClientCodec.java:202)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)

@dave-fl
Copy link

dave-fl commented Sep 2, 2018

Sorry last one. I really hope these are useful. This is basically the end to end of a single click to a leak. I've removed things where I have to.

2018-09-02 14:06:39.597 DEBUG 32212 --- [ctor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0xd8555528, L:/0:0:0:0:0:0:0:0:8090] READ: [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784]
2018-09-02 14:06:39.597 DEBUG 32212 --- [ctor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0xd8555528, L:/0:0:0:0:0:0:0:0:8090] READ COMPLETE
2018-09-02 14:06:39.597 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.http.server.HttpServerOperations   : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] New http connection, requesting read
2018-09-02 14:06:39.597 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.channel.ContextHandler       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] After pipeline DefaultChannelPipeline{(reactor.left.loggingHandler = io.netty.handler.logging.LoggingHandler), (ServerContextHandler#0 = reactor.ipc.netty.channel.ServerContextHandler), (reactor.left.httpCodec = io.netty.handler.codec.http.HttpServerCodec), (reactor.left.httpServerHandler = reactor.ipc.netty.http.server.HttpServerHandler), (reactor.right.reactiveBridge = reactor.ipc.netty.channel.ChannelOperationsHandler)}
2018-09-02 14:06:39.597 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] REGISTERED
2018-09-02 14:06:39.597 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] ACTIVE
2018-09-02 14:06:39.603 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] READ: 1024B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:39.610 DEBUG 32212 --- [ctor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0xd8555528, L:/0:0:0:0:0:0:0:0:8090] READ: [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787]
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] READ COMPLETE
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0xd8555528, L:/0:0:0:0:0:0:0:0:8090] READ COMPLETE
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-3] r.i.n.http.server.HttpServerOperations   : [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787] New http connection, requesting read
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-3] r.ipc.netty.channel.ContextHandler       : [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787] After pipeline DefaultChannelPipeline{(reactor.left.loggingHandler = io.netty.handler.logging.LoggingHandler), (ServerContextHandler#0 = reactor.ipc.netty.channel.ServerContextHandler), (reactor.left.httpCodec = io.netty.handler.codec.http.HttpServerCodec), (reactor.left.httpServerHandler = reactor.ipc.netty.http.server.HttpServerHandler), (reactor.right.reactiveBridge = reactor.ipc.netty.channel.ChannelOperationsHandler)}
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-3] r.ipc.netty.http.server.HttpServer       : [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787] REGISTERED
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-3] r.ipc.netty.http.server.HttpServer       : [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787] ACTIVE
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0xd8555528, L:/0:0:0:0:0:0:0:0:8090] READ: [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788]
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-1] r.ipc.netty.http.server.HttpServer       : [id: 0xd8555528, L:/0:0:0:0:0:0:0:0:8090] READ COMPLETE
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.http.server.HttpServerOperations   : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] New http connection, requesting read
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.channel.ContextHandler       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] After pipeline DefaultChannelPipeline{(reactor.left.loggingHandler = io.netty.handler.logging.LoggingHandler), (ServerContextHandler#0 = reactor.ipc.netty.channel.ServerContextHandler), (reactor.left.httpCodec = io.netty.handler.codec.http.HttpServerCodec), (reactor.left.httpServerHandler = reactor.ipc.netty.http.server.HttpServerHandler), (reactor.right.reactiveBridge = reactor.ipc.netty.channel.ChannelOperationsHandler)}
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] REGISTERED
2018-09-02 14:06:39.634 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] ACTIVE
2018-09-02 14:06:39.638 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] READ: 727B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:39.640 DEBUG 32212 --- [ctor-http-nio-3] r.ipc.netty.http.server.HttpServer       : [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787] READ: 1024B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:39.642 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.http.server.HttpServerOperations   : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] Increasing pending responses, now 1
2018-09-02 14:06:39.642 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] READ COMPLETE
2018-09-02 14:06:39.642 DEBUG 32212 --- [ctor-http-nio-3] r.ipc.netty.http.server.HttpServer       : [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787] READ COMPLETE
2018-09-02 14:06:39.642 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.channel.ChannelOperations    : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] [HttpServer] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@33b3763
2018-09-02 14:06:39.645 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.resources.DefaultPoolResources     : [id: 0x5aa42ae4, L: - R:80] Channel acquired, now 1 active connections and 0 inactive connections
2018-09-02 14:06:39.645 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.c.PooledClientContextHandler       : Acquiring existing channel from pool: DefaultPromise@6e1a98c1(success: [id: 0x5aa42ae4, L: - R:80]) SimpleChannelPool{activeConnections=1, inactiveConnections=0}
2018-09-02 14:06:39.645 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.c.PooledClientContextHandler       : [id: 0x5aa42ae4, L: - R:80] Acquired active channel
2018-09-02 14:06:39.645 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.channel.ChannelOperations    : [id: 0x5aa42ae4, L: - R:80] [HttpClient] Handler is being applied: HttpClientHandler{startURI=http://someendpoint, method=GET, handler=reactor.ipc.netty.http.client.HttpClient$$Lambda$548/634255648@26e38e80}
2018-09-02 14:06:39.645 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0x5aa42ae4, L: - R:80] Writing object DefaultHttpRequest(decodeResult: success, version: HTTP/1.1)
GET /someendpoint HTTP/1.1
user-agent: ReactorNetty/0.7.9.BUILD-SNAPSHOT
host: somehost
accept: */*
accept-encoding: gzip
Authorization: 
2018-09-02 14:06:39.648 DEBUG 32212 --- [ctor-http-nio-3] r.ipc.netty.http.server.HttpServer       : [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787] READ: 739B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:39.648 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] READ: 1024B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:39.653 DEBUG 32212 --- [ctor-http-nio-3] r.i.n.http.server.HttpServerOperations   : [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787] Increasing pending responses, now 1
2018-09-02 14:06:39.653 DEBUG 32212 --- [ctor-http-nio-3] r.ipc.netty.http.server.HttpServer       : [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787] READ COMPLETE
2018-09-02 14:06:39.653 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] READ COMPLETE
2018-09-02 14:06:39.653 DEBUG 32212 --- [ctor-http-nio-3] r.ipc.netty.channel.ChannelOperations    : [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787] [HttpServer] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@33b3763
2018-09-02 14:06:39.658 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] READ: 712B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:39.658 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.http.server.HttpServerOperations   : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] Increasing pending responses, now 1
2018-09-02 14:06:39.659 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] READ COMPLETE
2018-09-02 14:06:39.659 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.channel.ChannelOperations    : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] [HttpServer] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@33b3763
2018-09-02 14:06:39.666 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x5aa42ae4, L: - R:80] WRITE: 1303B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:39.668 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x5aa42ae4, L: - R:80] FLUSH
2018-09-02 14:06:39.668 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0x5aa42ae4, L: - R:80] Writing object EmptyLastHttpContent
2018-09-02 14:06:39.668 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x5aa42ae4, L: - R:80] WRITE: 0B
2018-09-02 14:06:39.668 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x5aa42ae4, L: - R:80] FLUSH
2018-09-02 14:06:40.127 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x5aa42ae4, L: - R:80] READ: 481B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.128 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.http.client.HttpClientOperations   : [id: 0x5aa42ae4, L: - R:80] Received response (auto-read:false) : 
2018-09-02 14:06:40.128 DEBUG 32212 --- [ctor-http-nio-2] reactor.ipc.netty.channel.FluxReceive    : [id: 0x5aa42ae4, L: - R:80] Subscribing inbound receiver [pending: 0, cancelled:false, inboundDone: false]
2018-09-02 14:06:40.128 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.http.client.HttpClientOperations   : [id: 0x5aa42ae4, L: - R:80] Received last HTTP packet
2018-09-02 14:06:40.131 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.c.PooledClientContextHandler       : Acquiring existing channel from pool: DefaultPromise@16595f89(incomplete) SimpleChannelPool{activeConnections=0, inactiveConnections=1}
2018-09-02 14:06:40.131 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.resources.DefaultPoolResources     : [id: 0x364f29b5, L: - R:443] Channel acquired, now 1 active connections and 0 inactive connections
2018-09-02 14:06:40.131 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x5aa42ae4, L: - R:80] USER_EVENT: [Handler Terminated]
2018-09-02 14:06:40.131 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0x5aa42ae4, L: - R:80] Disposing context reactor.ipc.netty.channel.PooledClientContextHandler@4068bbb
2018-09-02 14:06:40.131 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.c.PooledClientContextHandler       : [id: 0x364f29b5, L: - R::443] Acquired active channel
2018-09-02 14:06:40.131 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.c.PooledClientContextHandler       : [id: 0x5aa42ae4, L: - R:80] Releasing channel
2018-09-02 14:06:40.131 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.resources.DefaultPoolResources     : [id: 0x5aa42ae4, L: - R:80] Channel released, now 0 active connections and 1 inactive connections
2018-09-02 14:06:40.131 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x5aa42ae4, L: - R:80] READ COMPLETE
2018-09-02 14:06:40.131 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.channel.ChannelOperations    : [id: 0x364f29b5, L: - R:443] [HttpClient] Handler is being applied: HttpClientHandler{startURI=https://someendpoint, method=GET, handler=reactor.ipc.netty.http.client.HttpClient$$Lambda$548/634255648@53eb959d}
2018-09-02 14:06:40.131 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0x364f29b5, L: - R:443] Writing object DefaultHttpRequest(decodeResult: success, version: HTTP/1.1)
GET /someendpoint
user-agent: ReactorNetty/0.7.9.BUILD-SNAPSHOT
host: somehost
accept: */*
accept-encoding: gzip
2018-09-02 14:06:40.137 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x364f29b5, L: - R:443] WRITE: 509B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.138 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x364f29b5, L:L: - R:443] FLUSH
2018-09-02 14:06:40.138 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0x364f29b5, L:L: - R:443] Writing object EmptyLastHttpContent
2018-09-02 14:06:40.138 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x364f29b5, L:L: - R:443] WRITE: 0B
2018-09-02 14:06:40.138 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x364f29b5, L:L: - R:443] FLUSH
2018-09-02 14:06:40.242 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x364f29b5, L:L: - R:443] READ: 1492B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.243 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.http.client.HttpClientOperations   : [id: 0x364f29b5, L: - R:443] Received response (auto-read:false) : 
2018-09-02 14:06:40.244 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.resources.DefaultPoolResources     : [id: 0xb1a140e8, L: - R:443] Channel acquired, now 1 active connections and 2 inactive connections
2018-09-02 14:06:40.244 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.c.PooledClientContextHandler       : Acquiring existing channel from pool: DefaultPromise@19ec4edf(success: [id: 0xb1a140e8,  L: - R:443]) SimpleChannelPool{activeConnections=1, inactiveConnections=2}
2018-09-02 14:06:40.244 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.c.PooledClientContextHandler       : [id: 0xb1a140e8, L: - R:443] Acquired active channel
2018-09-02 14:06:40.245 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.resources.DefaultPoolResources     : [id: 0x825b0cdc, L: - R:443] Channel acquired, now 2 active connections and 1 inactive connections
2018-09-02 14:06:40.245 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.c.PooledClientContextHandler       : Acquiring existing channel from pool: DefaultPromise@408224d0(success: [id: 0x825b0cdc,  L: - R:443]) SimpleChannelPool{activeConnections=2, inactiveConnections=1}
2018-09-02 14:06:40.245 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.c.PooledClientContextHandler       : [id: 0x825b0cdc, L: - R:443] Acquired active channel
2018-09-02 14:06:40.246 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.c.PooledClientContextHandler       : Acquiring existing channel from pool: DefaultPromise@3ef8010e(incomplete) SimpleChannelPool{activeConnections=2, inactiveConnections=1}
2018-09-02 14:06:40.246 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.resources.DefaultPoolResources     : [id: 0x257bc7d0, L: - R:443] Channel acquired, now 3 active connections and 0 inactive connections
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.c.PooledClientContextHandler       : [id: 0x257bc7d0, L: - R:443] Acquired active channel
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.channel.ChannelOperations    : [id: 0x257bc7d0, L: - R:443] [HttpClient] Handler is being applied: HttpClientHandler{startURI=https://someendpoint, method=GET, handler=org.springframework.cloud.gateway.filter.NettyRoutingFilter$$Lambda$617/757733877@4adf7ec7}
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x257bc7d0, L: - R:443] USER_EVENT: reactor.ipc.netty.NettyPipeline$SendOptionsChangeEvent@7ab47f74
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.http.client.HttpClientOperations   : [id: 0x364f29b5, L: - R:443] Received last HTTP packet
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0x257bc7d0, L: - R:443] New sending options
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x364f29b5, L: - R:443] USER_EVENT: [Handler Terminated]
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0x364f29b5, L: - R:443] Disposing context reactor.ipc.netty.channel.PooledClientContextHandler@4c5d8478
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.c.PooledClientContextHandler       : [id: 0x364f29b5, L: - R:443] Releasing channel
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0x257bc7d0, L: - R:443] Writing object DefaultHttpRequest(decodeResult: success, version: HTTP/1.1)
GET /someendpoint
Bunch of Stuff
host: somehost
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.resources.DefaultPoolResources     : [id: 0x364f29b5, L: - R:443] Channel released, now 0 active connections and 1 inactive connections
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x364f29b5, L: - R:443] READ COMPLETE
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.channel.ChannelOperations    : [id: 0xb1a140e8, L: - R:443] [HttpClient] Handler is being applied: HttpClientHandler{startURI=https://someendpoint, method=GET, handler=org.springframework.cloud.gateway.filter.NettyRoutingFilter$$Lambda$617/757733877@42e4d1f3}
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0xb1a140e8, L: - R:443] USER_EVENT: reactor.ipc.netty.NettyPipeline$SendOptionsChangeEvent@b9445b8
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0xb1a140e8, L: - R:443] New sending options
2018-09-02 14:06:40.247 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0xb1a140e8, LL: - R:443] Writing object DefaultHttpRequest(decodeResult: success, version: HTTP/1.1)
GET /someendpoint
Bunch of stuff
host: somehost
2018-09-02 14:06:40.269 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x257bc7d0, L: - R:443] WRITE: 1956B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.271 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0xb1a140e8, L: - R:443] WRITE: 1971B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.271 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x257bc7d0, L: - R:443] FLUSH
2018-09-02 14:06:40.272 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0xb1a140e8, L: - R:443] FLUSH
2018-09-02 14:06:40.272 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0xb1a140e8, L: - R:443] Writing object 
2018-09-02 14:06:40.272 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0x257bc7d0, L: - R:443] Writing object 
2018-09-02 14:06:40.272 DEBUG 32212 --- [ctor-http-nio-2] reactor.ipc.netty.channel.FluxReceive    : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] Subscribing inbound receiver [pending: 0, cancelled:false, inboundDone: true]
2018-09-02 14:06:40.272 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.channel.ChannelOperations    : [id: 0x825b0cdc, L: - R:443] [HttpClient] Handler is being applied: HttpClientHandler{startURI=https://someendpoint, method=GET, handler=org.springframework.cloud.gateway.filter.NettyRoutingFilter$$Lambda$617/757733877@52e80594}
2018-09-02 14:06:40.273 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x825b0cdc, L: - R:443] USER_EVENT: reactor.ipc.netty.NettyPipeline$SendOptionsChangeEvent@1dc9499f
2018-09-02 14:06:40.273 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0x825b0cdc, L: - R:443] New sending options
2018-09-02 14:06:40.273 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0x825b0cdc, L: - R:443] Writing object DefaultHttpRequest(decodeResult: success, version: HTTP/1.1)
GET /someendpoint
Bunch of stuff
host: somehost
2018-09-02 14:06:40.294 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x825b0cdc, L: - R:443] WRITE: 1979B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.297 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x825b0cdc, L: - R:443] FLUSH
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0x825b0cdc, L: - R:443] Writing object 
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-4] reactor.ipc.netty.channel.FluxReceive    : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] Subscribing inbound receiver [pending: 0, cancelled:false, inboundDone: true]
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-3] reactor.ipc.netty.channel.FluxReceive    : [id: 0x16feef32, L:/127.0.0.1:8090 - R:/127.0.0.1:41787] Subscribing inbound receiver [pending: 0, cancelled:false, inboundDone: true]
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0xb1a140e8, L: - R:443] Writing object EmptyLastHttpContent
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0xb1a140e8, L: - R:443] WRITE: 0B
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0x257bc7d0, L: - R:443] Writing object EmptyLastHttpContent
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0xb1a140e8, L: - R:443] FLUSH
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x257bc7d0, L: - R:443] WRITE: 0B
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x257bc7d0, L: - R:443] FLUSH
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0x825b0cdc, L: - R:443] Writing object EmptyLastHttpContent
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x825b0cdc, L: - R:443] WRITE: 0B
2018-09-02 14:06:40.298 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x825b0cdc, L: - R:443] FLUSH
2018-09-02 14:06:40.327 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x257bc7d0, L: - R:443] READ: 1940B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d |HTTP/1.1 200 OK.|
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.334 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.http.client.HttpClientOperations   : [id: 0x257bc7d0, L: - R:443] Received response (auto-read:false) : 
2018-09-02 14:06:40.334 DEBUG 32212 --- [ctor-http-nio-2] reactor.ipc.netty.channel.FluxReceive    : [id: 0x257bc7d0, L: - R:443] Subscribing inbound receiver [pending: 0, cancelled:false, inboundDone: false]
2018-09-02 14:06:40.334 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.http.client.HttpClientOperations   : [id: 0x257bc7d0, L: - R:443] Received last HTTP packet
2018-09-02 14:06:40.335 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x257bc7d0, L: - R:443] USER_EVENT: [Handler Terminated]
2018-09-02 14:06:40.335 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0x257bc7d0, L: - R:443] Disposing context reactor.ipc.netty.channel.PooledClientContextHandler@7397a302
2018-09-02 14:06:40.335 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.c.PooledClientContextHandler       : [id: 0x257bc7d0, L: - R:443] Releasing channel
2018-09-02 14:06:40.335 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.resources.DefaultPoolResources     : [id: 0x257bc7d0, L: - R:443] Channel released, now 2 active connections and 1 inactive connections
2018-09-02 14:06:40.335 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.client.HttpClient       : [id: 0x257bc7d0, L: - R:443] READ COMPLETE
2018-09-02 14:06:40.341 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0xb1a140e8, L: - R:443] READ: 1658B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d |HTTP/1.1 200 OK.|
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.341 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.http.client.HttpClientOperations   : [id: 0xb1a140e8, L: - R:443] Received response (auto-read:false) : 
2018-09-02 14:06:40.341 DEBUG 32212 --- [ctor-http-nio-4] reactor.ipc.netty.channel.FluxReceive    : [id: 0xb1a140e8, L: - R:443] Subscribing inbound receiver [pending: 0, cancelled:false, inboundDone: false]
2018-09-02 14:06:40.342 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.http.client.HttpClientOperations   : [id: 0xb1a140e8, L: - R:443] Received last HTTP packet
2018-09-02 14:06:40.342 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] Writing object DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 200 OK
transfer-encoding: chunked
Bunch of stuff
2018-09-02 14:06:40.342 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0xb1a140e8, L: - R:443] USER_EVENT: [Handler Terminated]
2018-09-02 14:06:40.342 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0xb1a140e8, L: - R:443] Disposing context reactor.ipc.netty.channel.PooledClientContextHandler@249e5f99
2018-09-02 14:06:40.342 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.c.PooledClientContextHandler       : [id: 0xb1a140e8, L: - R:443] Releasing channel
2018-09-02 14:06:40.342 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.resources.DefaultPoolResources     : [id: 0xb1a140e8, L: - R:443] Channel released, now 1 active connections and 2 inactive connections
2018-09-02 14:06:40.342 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0xb1a140e8, L: - R:443] READ COMPLETE
2018-09-02 14:06:40.342 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] Writing object DefaultHttpResponse(decodeResult: success, version: HTTP/1.1)
HTTP/1.1 200 OK
transfer-encoding: chunked
Bunch of stuff
2018-09-02 14:06:40.355 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] WRITE: 1238B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+

+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.355 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] WRITE: 1238B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d |HTTP/1.1 200 OK.|
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.355 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] FLUSH
2018-09-02 14:06:40.356 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] FLUSH
2018-09-02 14:06:40.356 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] Writing object 
2018-09-02 14:06:40.356 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] Writing object 
2018-09-02 14:06:40.356 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] WRITE: 5B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.356 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] WRITE: 5B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.362 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] WRITE: 454B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.366 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] WRITE: 736B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.366 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] WRITE: 2B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] FLUSH
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] WRITE: 2B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] FLUSH
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.http.server.HttpServerOperations   : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] Last HTTP response frame
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] Writing object EmptyLastHttpContent
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.http.server.HttpServerOperations   : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] Last HTTP response frame
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] Writing object EmptyLastHttpContent
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] WRITE: 5B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.http.server.HttpServerOperations   : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] Decreasing pending responses, now 0
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] FLUSH
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] WRITE: 5B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.http.server.HttpServerOperations   : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] Decreasing pending responses, now 0
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] FLUSH
2018-09-02 14:06:40.368 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.channel.ChannelOperations    : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] Discarding inbound content
2018-09-02 14:06:40.368 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] USER_EVENT: [Handler Terminated]
2018-09-02 14:06:40.368 DEBUG 32212 --- [ctor-http-nio-2] r.i.n.channel.ChannelOperationsHandler   : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] Disposing context reactor.ipc.netty.channel.ServerContextHandler@aa53b55
2018-09-02 14:06:40.368 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] READ COMPLETE
2018-09-02 14:06:40.368 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 - R:/127.0.0.1:41784] EXCEPTION: java.io.IOException: An established connection was aborted by the software in your host machine

java.io.IOException: An established connection was aborted by the software in your host machine
	at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[na:1.8.0_144]
	at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[na:1.8.0_144]
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[na:1.8.0_144]
	at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[na:1.8.0_144]
	at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[na:1.8.0_144]
	at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1108) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.buffer.WrappedByteBuf.writeBytes(WrappedByteBuf.java:813) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.buffer.AdvancedLeakAwareByteBuf.writeBytes(AdvancedLeakAwareByteBuf.java:635) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:347) ~[netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:148) ~[netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628) [netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563) [netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480) [netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442) [netty-transport-4.1.29.Final.jar:4.1.29.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) [netty-common-4.1.29.Final.jar:4.1.29.Final]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]

2018-09-02 14:06:40.368 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 ! R:/127.0.0.1:41784] INACTIVE
2018-09-02 14:06:40.369 DEBUG 32212 --- [ctor-http-nio-2] r.ipc.netty.http.server.HttpServer       : [id: 0xe389b4e7, L:/127.0.0.1:8090 ! R:/127.0.0.1:41784] UNREGISTERED
2018-09-02 14:06:40.367 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.channel.ChannelOperations    : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] Discarding inbound content
2018-09-02 14:06:40.369 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.server.HttpServer       : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] USER_EVENT: [Handler Terminated]
2018-09-02 14:06:40.369 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.channel.ChannelOperationsHandler   : [id: 0x22da6a18, L:/127.0.0.1:8090 - R:/127.0.0.1:41788] Disposing context reactor.ipc.netty.channel.ServerContextHandler@aa53b55
2018-09-02 14:06:40.505 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x825b0cdc, L: - R:443] READ: 10136B
		 +-------------------------------------------------+
		 |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
+--------+-------------------------------------------------+----------------+
|00000000| 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d |HTTP/1.1 200 OK.|
+--------+-------------------------------------------------+----------------+
2018-09-02 14:06:40.510 DEBUG 32212 --- [ctor-http-nio-4] r.i.n.http.client.HttpClientOperations   : [id: 0x825b0cdc, L: - R:443] Received response (auto-read:false) : 
2018-09-02 14:06:40.511 DEBUG 32212 --- [ctor-http-nio-4] reactor.ipc.netty.channel.FluxReceive    : [id: 0x825b0cdc, L: - R:443] Subscribing inbound receiver [pending: 0, cancelled:false, inboundDone: false]
2018-09-02 14:06:40.514 ERROR 32212 --- [ctor-http-nio-4] io.netty.util.ResourceLeakDetector       : LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records: 
#1:
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:273)
	io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:241)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
#2:
	io.netty.buffer.AdvancedLeakAwareByteBuf.getUnsignedByte(AdvancedLeakAwareByteBuf.java:160)
	io.netty.buffer.ByteBufUtil$HexUtil.appendPrettyHexDump(ByteBufUtil.java:1092)
	io.netty.buffer.ByteBufUtil$HexUtil.access$300(ByteBufUtil.java:946)
	io.netty.buffer.ByteBufUtil.appendPrettyHexDump(ByteBufUtil.java:942)
	io.netty.buffer.ByteBufUtil.appendPrettyHexDump(ByteBufUtil.java:933)
	io.netty.handler.logging.LoggingHandler.formatByteBuf(LoggingHandler.java:335)
	io.netty.handler.logging.LoggingHandler.format(LoggingHandler.java:290)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:239)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
#3:
	io.netty.buffer.AdvancedLeakAwareByteBuf.getUnsignedByte(AdvancedLeakAwareByteBuf.java:160)
	io.netty.buffer.ByteBufUtil$HexUtil.appendPrettyHexDump(ByteBufUtil.java:1098)
	io.netty.buffer.ByteBufUtil$HexUtil.access$300(ByteBufUtil.java:946)
	io.netty.buffer.ByteBufUtil.appendPrettyHexDump(ByteBufUtil.java:942)
	io.netty.buffer.ByteBufUtil.appendPrettyHexDump(ByteBufUtil.java:933)
	io.netty.handler.logging.LoggingHandler.formatByteBuf(LoggingHandler.java:335)
	io.netty.handler.logging.LoggingHandler.format(LoggingHandler.java:290)
	io.netty.handler.logging.LoggingHandler.channelRead(LoggingHandler.java:239)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
#4:
	Hint: 'reactor.left.loggingHandler' will handle the message from this point.
	io.netty.channel.DefaultChannelPipeline.touch(DefaultChannelPipeline.java:116)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
#5:
	io.netty.buffer.AdvancedLeakAwareByteBuf.internalNioBuffer(AdvancedLeakAwareByteBuf.java:736)
	io.netty.handler.ssl.SslHandler.toByteBuffer(SslHandler.java:1439)
	io.netty.handler.ssl.SslHandler.access$300(SslHandler.java:165)
	io.netty.handler.ssl.SslHandler$SslEngineType$1.unwrap(SslHandler.java:217)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1297)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
#6:
	io.netty.buffer.AdvancedLeakAwareByteBuf.nioBufferCount(AdvancedLeakAwareByteBuf.java:706)
	io.netty.handler.ssl.SslHandler.toByteBuffer(SslHandler.java:1439)
	io.netty.handler.ssl.SslHandler.access$300(SslHandler.java:165)
	io.netty.handler.ssl.SslHandler$SslEngineType$1.unwrap(SslHandler.java:217)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1297)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
Created at:
	io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:331)
	io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:185)
	io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:176)
	io.netty.handler.ssl.SslHandler.allocate(SslHandler.java:1909)
	io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1292)
	io.netty.handler.ssl.SslHandler.decodeNonJdkCompatible(SslHandler.java:1211)
	io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1245)
	io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
	io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
	io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
	io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
	io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	java.lang.Thread.run(Thread.java:748)
: 2997 leak records were discarded because they were duplicates
: 2997 leak records were discarded because the leak record count is targeted to 4. Use system property io.netty.leakDetection.targetRecords to increase the limit.
2018-09-02 14:06:40.521 DEBUG 32212 --- [ctor-http-nio-4] r.ipc.netty.http.client.HttpClient       : [id: 0x825b0cdc, L: - R:443] READ COMPLETE

@dave-fl
Copy link

dave-fl commented Sep 2, 2018

I just ran FluxReceiveTest.testByteBufsReleasedWhenTimeout and it shows as passed but the logs show memory being leaked. Not sure if that is to be expected.

@violetagg
Copy link
Member

@dave-fl yep I think we have an issue. I'm on it.

@dave-fl
Copy link

dave-fl commented Sep 3, 2018

Indirectly related, but it might be useful to add some sort of deterministic leak detection to the test cases as an enhancement, this way assertions can be used to check for buffer size rather than counting on the garbage collector to have run. Perhaps already "well known" or maybe even better solutions exist. But definitely makes visibility into the buffer count easier at least for me.

netty/netty#5277

@violetagg violetagg added this to the 0.7.x Maintenance Backlog milestone Sep 4, 2018
@smaldini smaldini added the type/bug A general bug label Sep 7, 2018
@violetagg
Copy link
Member

@dave-fl Do you specify response timeout when using Spring Gateway?

@dave-fl
Copy link

dave-fl commented Sep 11, 2018

@violetagg Yes, we set all our timeouts

@dave-fl
Copy link

dave-fl commented Sep 11, 2018

@violetagg I am not sure that timeouts are the full issue here, e.g. if any sort of IO Exception happens mid-flight the same end result could be the case. We are seeing this in some of our calls. I think it would be worth creating a test case that attempts to simulate an abrupt termination of a connection although whatever has to be done in order to fix the timeout issue might end up fixing this as well.

2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 2018-09-10 22:22:56.025 TRACE 15 --- [server-epoll-13] filter.ErrorFilter  : reactor.ipc.netty.channel.AbortedException: Connection has been closed
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT reactor.ipc.netty.channel.AbortedException: Connection has been closed
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at reactor.ipc.netty.channel.ChannelOperationsHandler.discard(ChannelOperationsHandler.java:365) ~[reactor-netty-0.7.8.RELEASE.jar!/:0.7.8.RELEASE]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at reactor.ipc.netty.channel.ChannelOperationsHandler.drain(ChannelOperationsHandler.java:375) ~[reactor-netty-0.7.8.RELEASE.jar!/:0.7.8.RELEASE]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at reactor.ipc.netty.channel.ChannelOperationsHandler.handlerRemoved(ChannelOperationsHandler.java:208) ~[reactor-netty-0.7.8.RELEASE.jar!/:0.7.8.RELEASE]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:670) ~[netty-transport-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.channel.DefaultChannelPipeline.destroyDown(DefaultChannelPipeline.java:922) ~[netty-transport-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.channel.DefaultChannelPipeline.destroyUp(DefaultChannelPipeline.java:888) ~[netty-transport-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.channel.DefaultChannelPipeline.destroy(DefaultChannelPipeline.java:880) ~[netty-transport-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.channel.DefaultChannelPipeline.access$700(DefaultChannelPipeline.java:46) ~[netty-transport-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelUnregistered(DefaultChannelPipeline.java:1416) ~[netty-transport-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelUnregistered(AbstractChannelHandlerContext.java:181) ~[netty-transport-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelUnregistered(AbstractChannelHandlerContext.java:167) ~[netty-transport-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.channel.DefaultChannelPipeline.fireChannelUnregistered(DefaultChannelPipeline.java:865) ~[netty-transport-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.channel.AbstractChannel$AbstractUnsafe$8.run(AbstractChannel.java:830) ~[netty-transport-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404) ~[netty-common-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:322) ~[netty-transport-native-epoll-4.1.27.Final-linux-x86_64.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.27.Final.jar!/:4.1.27.Final]
2018-09-10T18:22:56.02-0400 [APP/PROC/WEB/1] OUT 	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_172]

@violetagg
Copy link
Member

@dave-fl Do you think you can try that
spring-cloud/spring-cloud-gateway#540

@dave-fl
Copy link

dave-fl commented Sep 11, 2018

@violetagg I can try that. I see that you have moved to Netty native timeouts.

Can you please comment on the possibility of a leak with the connections being aborted. I am mentioning this because I still saw leaks when in paranoid mode even when no timeouts were taking place.

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Sep 11, 2018

Since WebFlux was mentioned earlier in this thread, keep in mind the following two fixes SPR-17025 and SPR-17246. There is also SPR-17193 if Jackson is in use.

@violetagg
Copy link
Member

violetagg commented Sep 11, 2018

@dave-fl With Reactor Netty 0.7.x implementation the timeouts (provided by Flux/Mono) cannot be handled correctly and because of that Spring Gateway implementation will use the Netty's ReadTimeoutHandler.
With Reactor Netty 0.8.x implementation we can handle this use case properly.

Can you please comment on the possibility of a leak with the connections being aborted. I am mentioning this because I still saw leaks when in paranoid mode even when no timeouts were taking place.

If you are able to provide some reproducible scenario? Otherwise I'll try to simulate something on my side and do a code review for possible memory leaks in such situations.

@dave-fl
Copy link

dave-fl commented Sep 11, 2018

@violetagg I wish I could, unfortunately I don't have one as this is happening on an end to end test.

I believe there are some proxies out there that can simulate various network conditions. It might be worth running a gateway style test where the client and connection from gateway to the back end server route through one of these proxies that simulate the occasional connection/network error.

I think I saw that 0.8.x is now RC1, are these cases already handled or on the TODO list before GA?

@rstoyanchev Thanks for mentioning those. We've cherry already cherry picked SPR-17025.

@violetagg
Copy link
Member

I think I saw that 0.8.x is now RC1, are these cases already handled or on the TODO list before GA?

they are handled

@antoniy
Copy link

antoniy commented Sep 22, 2018

+1

Having the same issue popping at random on production deployment. We have Spring Boot 2 service, using WebFlux and reactive WebClient. Can we expect a fix any time soon, guys?

@violetagg
Copy link
Member

@antoniy Till now we identified issue when Flux/Mono#timeout is used and recommended Netty's ReadTimeoutHandler/WriteTimeoutHandler usage instead of Flux/Mono#timeout. Is your scenario the same or something else?

@danielra
Copy link

Running the demo test project linked previously a few times built against the suggested snapshot versions, I haven't seen any buffer leak reports so far - but I do still sometimes see an IllegalReferenceCountException:

09:21:56.522 [DEBUG] [TestEventLogger]     2018-10-22 09:21:56.521 ERROR 10881 --- [     parallel-2] reactor.core.publisher.Operators         : Operator called default onErrorDropped
09:21:56.522 [DEBUG] [TestEventLogger]
09:21:56.522 [DEBUG] [TestEventLogger]     io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
09:21:56.522 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractReferenceCountedByteBuf.release0(AbstractReferenceCountedByteBuf.java:100) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.522 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:84) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.522 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractPooledDerivedByteBuf$PooledNonRetainedSlicedByteBuf.release0(AbstractPooledDerivedByteBuf.java:271) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.522 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractDerivedByteBuf.release(AbstractDerivedByteBuf.java:85) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.522 [DEBUG] [TestEventLogger]          at io.netty.buffer.WrappedByteBuf.release(WrappedByteBuf.java:1029) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.522 [DEBUG] [TestEventLogger]          at io.netty.buffer.SimpleLeakAwareByteBuf.release(SimpleLeakAwareByteBuf.java:102) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.522 [DEBUG] [TestEventLogger]          at io.netty.buffer.AdvancedLeakAwareByteBuf.release(AdvancedLeakAwareByteBuf.java:941) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.522 [DEBUG] [TestEventLogger]          at io.netty.buffer.CompositeByteBuf$Component.freeIfNecessary(CompositeByteBuf.java:1683) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.522 [DEBUG] [TestEventLogger]          at io.netty.buffer.CompositeByteBuf.deallocate(CompositeByteBuf.java:1948) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.522 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractReferenceCountedByteBuf.release0(AbstractReferenceCountedByteBuf.java:95) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.523 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:84) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.523 [DEBUG] [TestEventLogger]          at io.netty.buffer.WrappedCompositeByteBuf.release(WrappedCompositeByteBuf.java:43) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.523 [DEBUG] [TestEventLogger]          at io.netty.buffer.SimpleLeakAwareCompositeByteBuf.release(SimpleLeakAwareCompositeByteBuf.java:38) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.523 [DEBUG] [TestEventLogger]          at io.netty.buffer.AdvancedLeakAwareCompositeByteBuf.release(AdvancedLeakAwareCompositeByteBuf.java:1023) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.523 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxUsing$UsingFuseableSubscriber.cleanup(FluxUsing.java:331) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.523 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxUsing$UsingFuseableSubscriber.cancel(FluxUsing.java:325) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.523 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.cancel(FluxMapFuseable.java:351) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.523 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxHandle$HandleSubscriber.cancel(FluxHandle.java:260) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.523 [DEBUG] [TestEventLogger]          at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.drainLoop(Operators.java:1905) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.523 [DEBUG] [TestEventLogger]          at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.drain(Operators.java:1874) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.523 [DEBUG] [TestEventLogger]          at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.cancel(Operators.java:1686) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.523 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.handleTimeout(FluxTimeout.java:287) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.523 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.doTimeout(FluxTimeout.java:273) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.523 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxTimeout$TimeoutTimeoutSubscriber.onNext(FluxTimeout.java:390) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.523 [DEBUG] [TestEventLogger]          at reactor.core.publisher.StrictSubscriber.onNext(StrictSubscriber.java:89) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.524 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:73) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.524 [DEBUG] [TestEventLogger]          at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:117) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.524 [DEBUG] [TestEventLogger]          at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:50) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.524 [DEBUG] [TestEventLogger]          at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:27) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.524 [DEBUG] [TestEventLogger]          at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_171]
09:21:56.524 [DEBUG] [TestEventLogger]          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_171]
09:21:56.524 [DEBUG] [TestEventLogger]          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_171]
09:21:56.524 [DEBUG] [TestEventLogger]          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_171]
09:21:56.524 [DEBUG] [TestEventLogger]          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_171]
09:21:56.524 [DEBUG] [TestEventLogger]          at java.lang.Thread.run(Thread.java:748) [na:1.8.0_171]
09:21:56.524 [DEBUG] [TestEventLogger]
09:21:56.524 [DEBUG] [TestEventLogger]     2018-10-22 09:21:56.523 ERROR 10881 --- [     parallel-2] reactor.core.scheduler.Schedulers        : Scheduler worker in group main failed with an uncaught exception
09:21:56.524 [DEBUG] [TestEventLogger]
09:21:56.524 [DEBUG] [TestEventLogger]     io.netty.util.IllegalReferenceCountException: refCnt: 0, decrement: 1
09:21:56.524 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractReferenceCountedByteBuf.release0(AbstractReferenceCountedByteBuf.java:100) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:84) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractPooledDerivedByteBuf$PooledNonRetainedSlicedByteBuf.release0(AbstractPooledDerivedByteBuf.java:271) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractDerivedByteBuf.release(AbstractDerivedByteBuf.java:85) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.WrappedByteBuf.release(WrappedByteBuf.java:1029) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.SimpleLeakAwareByteBuf.release(SimpleLeakAwareByteBuf.java:102) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.AdvancedLeakAwareByteBuf.release(AdvancedLeakAwareByteBuf.java:941) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.CompositeByteBuf$Component.freeIfNecessary(CompositeByteBuf.java:1683) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.CompositeByteBuf.deallocate(CompositeByteBuf.java:1948) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractReferenceCountedByteBuf.release0(AbstractReferenceCountedByteBuf.java:95) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.AbstractReferenceCountedByteBuf.release(AbstractReferenceCountedByteBuf.java:84) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.WrappedCompositeByteBuf.release(WrappedCompositeByteBuf.java:43) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.SimpleLeakAwareCompositeByteBuf.release(SimpleLeakAwareCompositeByteBuf.java:38) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at io.netty.buffer.AdvancedLeakAwareCompositeByteBuf.release(AdvancedLeakAwareCompositeByteBuf.java:1023) ~[netty-buffer-4.1.29.Final.jar:4.1.29.Final]
09:21:56.527 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxUsing$UsingFuseableSubscriber.cleanup(FluxUsing.java:331) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.527 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxUsing$UsingFuseableSubscriber.cancel(FluxUsing.java:325) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxMapFuseable$MapFuseableConditionalSubscriber.cancel(FluxMapFuseable.java:351) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxHandle$HandleSubscriber.cancel(FluxHandle.java:260) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.drainLoop(Operators.java:1905) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.drain(Operators.java:1874) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.cancel(Operators.java:1686) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.handleTimeout(FluxTimeout.java:287) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxTimeout$TimeoutMainSubscriber.doTimeout(FluxTimeout.java:273) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxTimeout$TimeoutTimeoutSubscriber.onNext(FluxTimeout.java:390) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.publisher.StrictSubscriber.onNext(StrictSubscriber.java:89) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onNext(FluxOnErrorResume.java:73) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:117) ~[reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:50) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:27) [reactor-core-3.2.2.BUILD-SNAPSHOT.jar:3.2.2.BUILD-SNAPSHOT]
09:21:56.528 [DEBUG] [TestEventLogger]          at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_171]
09:21:56.528 [DEBUG] [TestEventLogger]          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[na:1.8.0_171]
09:21:56.528 [DEBUG] [TestEventLogger]          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[na:1.8.0_171]
09:21:56.528 [DEBUG] [TestEventLogger]          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_171]
09:21:56.529 [DEBUG] [TestEventLogger]          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_171]
09:21:56.529 [DEBUG] [TestEventLogger]          at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_171]

@dave-fl
Copy link

dave-fl commented Oct 25, 2018

@violetagg Any comments on these latest logs and new errors?

@madgnome
Copy link
Author

Will upgrade to SB 2.1.0 today and see if we still see the errors.

@rstoyanchev
Copy link
Contributor

@madgnome just a quick note, if you're using any of: request body predicate, request body transformer, response body transformer, please turn those off for now before testing. There are expected fixes for those in the next Spring Cloud Gateway release.

@madgnome
Copy link
Author

madgnome commented Nov 2, 2018

We're not using Spring Cloud Gateway.

Unfortunately the issue seems worse in Spring Boot 2.1

image

We use timeout() operator.

LEAK: ByteBuf.release()
was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information. 

Recent access records: 

#1: io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:273)
    io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
    io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1199)
    io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1243)
    io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
    io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
    io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
    io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
    io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
    io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
    io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
    java.lang.Thread.run(Thread.java:748)

#2: io.netty.buffer.AdvancedLeakAwareByteBuf.forEachByte(AdvancedLeakAwareByteBuf.java:670)
    io.netty.handler.codec.http.HttpObjectDecoder$HeaderParser.parse(HttpObjectDecoder.java:801)
    io.netty.handler.codec.http.HttpObjectDecoder$LineParser.parse(HttpObjectDecoder.java:850)
    io.netty.handler.codec.http.HttpObjectDecoder.decode(HttpObjectDecoder.java:208)
    io.netty.handler.codec.http.HttpClientCodec$Decoder.decode(HttpClientCodec.java:202)
    io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:253)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
    io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1199)
    io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1243)
    io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
    io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
    io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
    io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
    io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
    io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
    io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
    java.lang.Thread.run(Thread.java:748)

#3: Hint: 'reactor.left.httpCodec' will handle the message from this point. io.netty.channel.DefaultChannelPipeline.touch(DefaultChannelPipeline.java:116)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:345)
    io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1429)
    io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1199)
    io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1243)
    io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
    io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
    io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
    io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
    io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
    io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
    io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
    java.lang.Thread.run(Thread.java:748)

#4: io.netty.buffer.AdvancedLeakAwareByteBuf.internalNioBuffer(AdvancedLeakAwareByteBuf.java:736)
    io.netty.handler.ssl.SslHandler.toByteBuffer(SslHandler.java:1439)
    io.netty.handler.ssl.SslHandler.access$300(SslHandler.java:165)
    io.netty.handler.ssl.SslHandler$SslEngineType$3.unwrap(SslHandler.java:295)
    io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1297)
    io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1199)
    io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1243)
    io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
    io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
    io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
    io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
    io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
    io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
    io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
    java.lang.Thread.run(Thread.java:748)

#5: io.netty.buffer.AdvancedLeakAwareByteBuf.nioBufferCount(AdvancedLeakAwareByteBuf.java:706)
    io.netty.handler.ssl.SslHandler.toByteBuffer(SslHandler.java:1439)
    io.netty.handler.ssl.SslHandler.access$300(SslHandler.java:165)
    io.netty.handler.ssl.SslHandler$SslEngineType$3.unwrap(SslHandler.java:295)
    io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1297)
    io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1199)
    io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1243)
    io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
    io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
    io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
    io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
    io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
    io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
    io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
    java.lang.Thread.run(Thread.java:748)
    Created at: io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:331)
    io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:185)
    io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:176)
    io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:113)
    io.netty.handler.ssl.SslHandler.allocate(SslHandler.java:1911)
    io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1292)
    io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1199)
    io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1243)
    io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
    io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
    io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
    io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
    io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
    io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
    io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
    io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:628)
    io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:563)
    io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:480)
    io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442)
    io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
    java.lang.Thread.run(Thread.java:748)
: 13 leak records were discarded because the leak record count is targeted to 4. Use system property io.netty.leakDetection.targetRecords to increase the limit.

@rstoyanchev
Copy link
Contributor

@madgnome, do you have anything reproducible that we can use to investigate? if not can you describe the code in high level terms (e.g. Spring MVC / Boot app, using the WebClient, etc), and provide some relevant code snippets? Note also SPR-17473 just addressed but without any sample code I can't be sure if you use onStatus hooks or not.

@madgnome
Copy link
Author

Thanks @rstoyanchev we do use onStatus without consuming the body so I'll fix that and see if the leak disappears. 🤞

@violetagg
Copy link
Member

One issue identified when sending data and request method GET
#512

@violetagg
Copy link
Member

Two new fixes related to web sockets and redirection
#513 #515

@madgnome
Copy link
Author

madgnome commented Nov 20, 2018

Making sure we consume the responseBody on onStatus didn't fix the leaks. (It may have reduced the number but not enough to be sure)

I will see if I can try the latest snapshot to get #512 fix

@madgnome
Copy link
Author

madgnome commented Nov 21, 2018

Deployed the latest snapshot and still seeing the errors unfortunately =(

I've ran the service for DEBUG log for reactor.netty.http here's the log file starting from the leak

reactornetty_issue_442.txt

And here's another one with all reactor.netty in DEBUG mode.

reactornetty_issue_442_all.txt

@dave-fl
Copy link

dave-fl commented Nov 28, 2018

We are testing again. Latest build continues to leak. Spring 2.1.0 Release.

<spring-cloud.version>Greenwich.M3</spring-cloud.version>
<reactor-bom.version>Californium-SR3</reactor-bom.version>
<netty.version>4.1.31.Final</netty.version>

leak.txt

@dave-fl
Copy link

dave-fl commented Nov 28, 2018

For the latest version, it seems like using option (on Spring Cloud Gateway):

gateway:
  httpclient:
    response-timeout: 20s

Is what is causing possibly a lot of the memory leak errors. What I wonder though is that if that is corrected on the Spring Cloud Gateway side, will the leaks still occur when legitimate timeouts are taking place.

@madgnome
Copy link
Author

madgnome commented Jan 18, 2019

@violetagg Good news! I was able to reproduce the issue locally and I think it was fixed by #554
I'll deploy to production to confirm.

I confirm no more leaks in production when using v0.8.4

For people facing a related leak issue and trying to reproduce locally, here are things that helped us reproducing locally:

  • Switch to paranoid mode -Dio.netty.leakDetection.level=paranoid
  • Introduce gc call (System.gc()) at the end of your http calls, we put it manually but you could put it more systematically with an handler.

@violetagg violetagg modified the milestones: 0.7.x Maintenance Backlog, 0.7.13.RELEASE Jan 22, 2019
@Casvad
Copy link

Casvad commented Feb 9, 2019

Same problem using Spring 2.1.2.RELEASE which uses reactor-netty-v0.8.4.RELEASE

@wdroste
Copy link

wdroste commented Feb 19, 2019

I also see the same issue in Spring Boot 2.1.2.RELEASE
2019-02-19 16:10:32.947 ERROR 20234 --- [or-http-epoll-1] io.netty.util.ResourceLeakDetector : LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information. Recent access records: Created at: io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:331) io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:185) io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:176) io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:113) org.springframework.core.io.buffer.NettyDataBufferFactory.allocateBuffer(NettyDataBufferFactory.java:71) org.springframework.core.io.buffer.NettyDataBufferFactory.allocateBuffer(NettyDataBufferFactory.java:39) org.springframework.core.codec.CharSequenceEncoder.lambda$encode$1(CharSequenceEncoder.java:85) reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:107) reactor.core.publisher.FluxJust$WeakScalarSubscription.request(FluxJust.java:99) reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:162) reactor.core.publisher.MonoNext$NextSubscriber.request(MonoNext.java:102) reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:1878) reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:1752) reactor.core.publisher.MonoNext$NextSubscriber.onSubscribe(MonoNext.java:64) reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:90) reactor.core.publisher.FluxJust.subscribe(FluxJust.java:70) reactor.core.publisher.FluxMapFuseable.subscribe(FluxMapFuseable.java:63) reactor.core.publisher.MonoNext.subscribe(MonoNext.java:40) reactor.core.publisher.MonoSwitchIfEmpty.subscribe(MonoSwitchIfEmpty.java:44) reactor.core.publisher.MonoFlatMap.subscribe(MonoFlatMap.java:60) reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:150) reactor.core.publisher.MonoCreate$DefaultMonoSink.success(MonoCreate.java:147) kotlinx.coroutines.reactor.MonoCoroutine.onCompleted(Mono.kt:51) kotlinx.coroutines.AbstractCoroutine.onCompletionInternal$kotlinx_coroutines_core(AbstractCoroutine.kt:108) kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:305) kotlinx.coroutines.JobSupport.tryFinalizeSimpleState(JobSupport.kt:264) kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:762) kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:742) kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:117) kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:45) kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)

@wdroste
Copy link

wdroste commented Feb 19, 2019

Same issue in Spring Boot 2.1.2 RELEASE

Basic code is feeding bytes into parser.

        return body
            .reduce(ParserContainer()) { c, buf ->
                try {
                    // parse each fragment
                    c.next(buf.asByteBuffer())
                } finally {
                    // memory leak detector says it needs to be released
                    DataBufferUtils.release(buf)
                }
            }
            // extract the response
            .map { it.response() ?: EmptyResponse() }

Exception:

2019-02-19 16:10:32.947 ERROR 20234 --- [or-http-epoll-1] io.netty.util.ResourceLeakDetector       : LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records: 
Created at:
        io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:331)
        io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:185)
        io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:176)
        io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:113)
        org.springframework.core.io.buffer.NettyDataBufferFactory.allocateBuffer(NettyDataBufferFactory.java:71)
        org.springframework.core.io.buffer.NettyDataBufferFactory.allocateBuffer(NettyDataBufferFactory.java:39)
        org.springframework.core.codec.CharSequenceEncoder.lambda$encode$1(CharSequenceEncoder.java:85)
        reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:107)
        reactor.core.publisher.FluxJust$WeakScalarSubscription.request(FluxJust.java:99)
        reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:162)
        reactor.core.publisher.MonoNext$NextSubscriber.request(MonoNext.java:102)
        reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:1878)
        reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:1752)
        reactor.core.publisher.MonoNext$NextSubscriber.onSubscribe(MonoNext.java:64)
        reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:90)
        reactor.core.publisher.FluxJust.subscribe(FluxJust.java:70)
        reactor.core.publisher.FluxMapFuseable.subscribe(FluxMapFuseable.java:63)
        reactor.core.publisher.MonoNext.subscribe(MonoNext.java:40)
        reactor.core.publisher.MonoSwitchIfEmpty.subscribe(MonoSwitchIfEmpty.java:44)
        reactor.core.publisher.MonoFlatMap.subscribe(MonoFlatMap.java:60)
        reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:150)
        reactor.core.publisher.MonoCreate$DefaultMonoSink.success(MonoCreate.java:147)
        kotlinx.coroutines.reactor.MonoCoroutine.onCompleted(Mono.kt:51)
        kotlinx.coroutines.AbstractCoroutine.onCompletionInternal$kotlinx_coroutines_core(AbstractCoroutine.kt:108)
        kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:305)
        kotlinx.coroutines.JobSupport.tryFinalizeSimpleState(JobSupport.kt:264)
        kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:762)
        kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:742)
        kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:117)
        kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:45)
        kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233)
        kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
        kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
        kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)

@spencergibb
Copy link

I'd try with boot 2.1.3.RELEASE as the reactor team has worked hard on these issues.

@wdroste
Copy link

wdroste commented Feb 19, 2019

@spencergibb will give it a try.

@Bas83
Copy link

Bas83 commented Apr 4, 2019

Unfortunately I have a similar error in Spring Boot 2.1.3.RELEASE, occurring in production. It may be related to the other side closing the connection just before, as we saw this error just before: reactor.netty.http.client.PrematureCloseException: Connection has been closed BEFORE response, while sending request body

Not doing anything fancy. Very basic high-level code.

Mono<ClientResponse> doRequest(WebhookCall webhookCall) {
        WebhookSetting webhookSetting = webhookCall.getWebhookSetting();
        String authString = webhookSetting.getAuthorizationHeader();

        return webClient.post()
                .uri(webhookSetting.getEndpoint())
                .headers(httpHeaders -> {
                    if (authString != null)
                        httpHeaders.add("Authorization", authString);
                })
                .body(BodyInserters.fromObject(getEventDTO(webhookCall.getEvent())))
                .exchange();
    }

and that code being called in this way:


Mono<ClientResponse> clientResponseMono = webhookRequestPoster.doRequest(webhookCall);
        clientResponseMono.subscribe(
                clientResponse -> clientResponseWritingService.insertClientResponse(webhookCall, clientResponse),
                throwable -> clientResponseWritingService.insertConnectionErrorResponse(webhookCall, throwable));

Error:

LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records: 
Created at:
    io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:339)
    io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:185)
    io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:171)
    io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:105)
    org.springframework.core.io.buffer.NettyDataBufferFactory.allocateBuffer(NettyDataBufferFactory.java:65)
    org.springframework.core.io.buffer.NettyDataBufferFactory.allocateBuffer(NettyDataBufferFactory.java:39)
    org.springframework.http.codec.json.AbstractJackson2Encoder.encodeValue(AbstractJackson2Encoder.java:172)
    org.springframework.http.codec.json.AbstractJackson2Encoder.lambda$encode$0(AbstractJackson2Encoder.java:122)
    reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:107)
    reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:2070)
    reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:162)
    reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:1878)
    reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onSubscribe(Operators.java:1752)
    reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:90)
    reactor.core.publisher.MonoJust.subscribe(MonoJust.java:54)
    reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:59)
    reactor.core.publisher.MonoSwitchIfEmpty.subscribe(MonoSwitchIfEmpty.java:44)
    reactor.core.publisher.MonoFlatMap.subscribe(MonoFlatMap.java:60)
    reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:52)
    reactor.netty.http.client.HttpClientConnect$HttpObserver.onStateChange(HttpClientConnect.java:421)
    reactor.netty.resources.PooledConnectionProvider$DisposableAcquire.onStateChange(PooledConnectionProvider.java:514)
    reactor.netty.resources.PooledConnectionProvider$DisposableAcquire.run(PooledConnectionProvider.java:544)
    io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
    io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
    io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:333)
    io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
    java.base/java.lang.Thread.run(Thread.java:834)

@violetagg
Copy link
Member

@Bas83 Try with the latest:

  • Reactor Core 3.2.9.BUILD-SNAPSHOT
  • Reactor Netty 0.8.7.BUILD-SNAPSHOT
  • Spring Framework 5.1.7.BUILD-SNAPSHOT

@Bas83
Copy link

Bas83 commented Apr 4, 2019

@violetagg have there been additional fixes in those versions or is that just to make sure it still exists in the current version? I would love to reproduce it in those versions but since the error is in production it's going to take some time.

@saad14092
Copy link

@violetagg I have the same issue in production using elastic Scheduler (unbounded) and the following version of the frameworks :

  • Reactor Core 3.3.0.RELEASE
  • Reactor Netty 0.9.1.RELEASE
  • Spring Framework 5.2.1.RELEASE

any help or explanation is appreciated. here is the stack trace

ERROR io.netty.util.ResourceLeakDetector.reportTracedLeak - LEAK: ByteBuf.release() was not called before it's garbage-collected. See https://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records:
Created at:
        io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:349)
        io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:187)
        io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:178)
        io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:115)
        io.netty.handler.ssl.SslHandler.allocate(SslHandler.java:2146)
        io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1327)
        io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1227)
        io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1274)
        io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:503)
        io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:442)
        io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:281)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
        io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
        io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1422)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
        io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
        io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:931)
        io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:792)
        io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:502)
        io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:407)
        io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050)
        io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        java.base/java.lang.Thread.run(Thread.java:834)

@violetagg
Copy link
Member

@saad14092 Please open a new issue. It will be really helpful if you provide more info for the use case and/or a test example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
Development

No branches or pull requests