并行请求抛出“没有可用的缓冲区空间”

发布于 2024-12-27 01:36:09 字数 202 浏览 1 评论 0原文

我的应用程序每 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

听风吹 2025-01-03 01:36:09

我刚刚遇到过类似的情况,运行 JMeter 的 Windows 7 客户端会开始产生此错误。我的客户端连接套接字已用完,默认值为 16384。
我运行

netsh int ipv4 set dynamicport tcp start=10000 num=40000

将数字增加到 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

netsh int ipv4 set dynamicport tcp start=10000 num=40000

which increases the number to 40000, and fixed my problem.
[ The default here is netsh int ipv4 set dynamicport tcp start=49152 num=16384 ]

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文