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

Memory not dropped after the connection closes #613

Open
FabianHummel opened this issue Sep 26, 2023 · 0 comments
Open

Memory not dropped after the connection closes #613

FabianHummel opened this issue Sep 26, 2023 · 0 comments

Comments

@FabianHummel
Copy link

The BufferAllocator allocates 16mb (by default) when a new connection is created, but does not free it when the connection is closed. Why is that? Are there any solutions? Call the below code in a whil(true) loop with a bit delay and see memory skyrocketing into GB-area. I honestly thought the library is bug-free?

Version: every version

Example:

var group = new MultithreadEventLoopGroup();
var bootstrap = new Bootstrap()
    .Group(group)
    .Channel<TcpSocketChannel>()
    .Option(ChannelOption.TcpNodelay, true)
    .Handler(new ActionChannelInitializer<IChannel>(c =>
    {
        c.Pipeline.AddLast(new StringEncoder(),new StringDecoder(),new TelnetClientHandler());
    }));

await bootstrap.ConnectAsync(IPAddress.Parse("127.0.0.1"), 3000);
await group.ShutdownGracefullyAsync();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant