Open
Description
Hello, Dotnetty Community,
My open source project has been using dotnetty for a long time. Recently, when the client called the server based on LibUV, it was normal for the first half hour and GC would perform garbage collection. After half an hour, the memory increased. According to dump analysis, it was caused by SingleThreadEventExecutor being blocked. Then the bootstrap Group configuration was changed to MultithreadEventLoopGroup, and the memory tended to stabilize while garbage was collected. The following is the error code:
IEventLoopGroup group;
var bootstrap = new Bootstrap();
if (AppConfig.ServerOptions.Libuv)
{
group = new EventLoopGroup();
}
else
{
group = new MultithreadEventLoopGroup();
}
bootstrap
.Channel<TcpSocketChannel>()
.Option(ChannelOption.TcpNodelay, true)
.Option(ChannelOption.Allocator, UnpooledByteBufferAllocator.Default)
.Group(group);
Metadata
Metadata
Assignees
Labels
No labels