并行请求抛出“没有可用的缓冲区空间”
我的应用程序每 5 分钟向 Web 服务执行 2000 个请求。启动了 25 个线程,每个线程都有一个循环,负责 80 个请求。但是,有时会引发以下异常:
java.net.SocketException: No buffer space available
是什么原因导致的?可能是网络瞬间掉线?
谢谢。
My application performs 2000 requests to a web service every 5 minutes. 25 threads are started, each of which has a loop that are responsible for 80 requests. However, sometimes the following exception is thrown:
java.net.SocketException: No buffer space available
What can be causing this? It may be a momentary drop in the network?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚遇到过类似的情况,运行 JMeter 的 Windows 7 客户端会开始产生此错误。我的客户端连接套接字已用完,默认值为 16384。
我运行
将数字增加到 40000,并解决了我的问题。
[这里默认是
netsh int ipv4 setdynamicport tcp start=49152 num=16384
]I've just had a similar situation where my windows 7 client running JMeter would start producing this error. I was running out of client connection sockets, where the default is 16384.
I ran
which increases the number to 40000, and fixed my problem.
[ The default here is
netsh int ipv4 set dynamicport tcp start=49152 num=16384
]