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

socket挡板当并发数较高时,出现了no buffer space available #319

Open
aspstar opened this issue Jun 9, 2022 · 3 comments
Open

Comments

@aspstar
Copy link

aspstar commented Jun 9, 2022

原因是系统的端口数耗尽了,当请求数超过65535就开始出问题了。原因可能是服务端没有及时关闭连接,我以前用python也写过类似的socket挡板,压测时也出现过类似问题,主动在服务端处理完请求后,释放连接就不会报错了。开发大神能否给出解决方案。

@ComeonBug
Copy link

ComeonBug commented Jun 9, 2022 via email

@aspstar
Copy link
Author

aspstar commented Jun 29, 2022

找到解决方案了有客户端的也有服务端的。服务端的方案需要修改源码MocoAggregator.java文件中的channelReadComplete函数,在ctx.fireChannelReadComplete();后面加上ctx.close();这样在高并发时就不会出现no buffer space available的错误了。

@ComeonBug
Copy link

ComeonBug commented Jun 29, 2022 via email

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

2 participants