垃圾收集期间负载均衡器和 Tomcat 之间出现 SocketException

发布于 2024-11-15 04:27:50 字数 311 浏览 6 评论 0原文

我们注意到以下问题:每当我们的 Tomcat JVM 执行 Full GC 时,在 LB 和 Tomcat 之间创建连接的请求都会失败。这是非常有问题的,因为所有这些请求将永远没有机会到达应用程序服务器。

即使我们将一个 Tomcat 指向另一个 Tomcat 且中间没有任何 LB,也会出现此问题。

是否有任何可以在 JVM / Tomcat / Linux 中完成的定义,使 HTTP 连接等待 GC 结束并且应用程序 JVM 将收到请求的时间。

我们使用 Java6、Tomcat7 和 Linux Ubuntu 操作系统。

谢谢, 约西

We have noticed the following problem: whenever our Tomcat JVM performs full GC, the requests to create a connection between the LB ant the Tomcat are failed. This is very problematic since all these requests will never get the chance to arrive to the application server.

This problem occured even when we have pointed one Tomcat to the other without any LB in between.

Are there any definition that can be done in the JVM / Tomcat / Linux that will make the HTTP connection to wait the time till the GC ends and the application JVM will receive the request.

We are using Java6, Tomcat7, and Linux Ubuntu OS.

Thanks,
Yosi

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

静水深流 2024-11-22 04:27:50

您是否考虑过使用“XX:+UseConcMarkSweepGC”选项来使用并发垃圾收集器?这本质上是在后台执行垃圾收集,这样就不会出现那么多(如果有的话)“停止世界”的完整 GC。

Have you looked into using the concurrent garbage collector using the 'XX:+UseConcMarkSweepGC' option? This essentially performs garbage collection in the background so that there aren't nearly as many (if any) "stop the world" full GCs.

感情旳空白 2024-11-22 04:27:50

您可能需要启用并发垃圾收集,如 http:// www.oracle.com/technetwork/java/gc-tuning-5-138395.html

-XX:+UseConcMarkSweepGC

还可以尝试其他 GC 配置。

You may need to enable concurrent garbage collection as described in http://www.oracle.com/technetwork/java/gc-tuning-5-138395.html

-XX:+UseConcMarkSweepGC

Also try other GC configs.

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