Skip to content

[bugfix] Release Netty buffers#3469

Merged
adamw merged 1 commit into
masterfrom
fix-netty-release-buf
Jan 22, 2024
Merged

[bugfix] Release Netty buffers#3469
adamw merged 1 commit into
masterfrom
fix-netty-release-buf

Conversation

@kciesielski
Copy link
Copy Markdown
Member

During performance tests of Netty servers (#3434) I noticed log entries like:

[info] 2024-01-22 11:04:21,657 [epollEventLoopGroup-2-4] ERROR io.netty.util.ResourceLeakDetector - LEAK: ByteBuf.release() was not called before it's garbage-collected. See https://netty.io/wiki/reference-counted-objects.html for more information.
[info] Recent access records:
[info] Created at:
[info]  io.netty.buffer.SimpleLeakAwareByteBuf.unwrappedDerived(SimpleLeakAwareByteBuf.java:144)

This fix adds explicit release of resources, which makes the problematic logs go away. We'll look deeper into memory consumption with a profiler using performance tests.

@kciesielski kciesielski marked this pull request as ready for review January 22, 2024 11:01
@kciesielski kciesielski requested a review from adamw January 22, 2024 11:01
@kciesielski kciesielski mentioned this pull request Jan 22, 2024
1 task
@adamw adamw merged commit 6a98a3a into master Jan 22, 2024
@adamw adamw deleted the fix-netty-release-buf branch January 22, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants