Skip to content

Client uses EventLoopGroup based on Group configuration, causing EventExecutor to block #633

Open
@fanliang11

Description

@fanliang11

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions