如何解决“打开文件过多”的问题 哈德逊有问题吗?

发布于 2024-07-05 00:30:15 字数 623 浏览 7 评论 0原文

我们使用 Hudson 作为持续集成系统来执行许多自动化构建(每晚并基于 CVS 轮询)我们的计划。

有些项目每 15 分钟轮询一次 CVS,有些项目每 5 分钟轮询一次,有些项目每小时轮询一次。

每隔几周,我们就会得到一个失败的构建,并显示以下输出:

FATAL: java.io.IOException: Too many open files
java.io.IOException: java.io.IOException: Too many open files
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)

下一个构建始终有效(有 0 次更改),因此我们总是将其记为同时运行 2 个构建作业,并且碰巧打开了太多文件在此过程中。

本周末,我们在周五晚上(自动夜间构建)发生了一次构建失败,并显示了该消息,并且其他所有夜间构建也都失败了。 不知何故,这促使 Hudson 不断构建每一个失败的项目,直到问题得到解决。 这导致每个项目每 30 分钟左右构建一次,直到周六晚上的某个时候问题神奇地消失了。

We use Hudson as a continuous integration system to execute automated builds (nightly and based on CVS polling) of a lot of our projects.

Some projects poll CVS every 15 minutes, some others poll every 5 minutes and some poll every hour.

Every few weeks we'll get a build that fails with the following output:

FATAL: java.io.IOException: Too many open files
java.io.IOException: java.io.IOException: Too many open files
    at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)

The next build always worked (with 0 changes) so we always chalked it up to 2 build jobs being run at the same time and happening to have too many files open during the process.

This weekend we had a build fail Friday night (automatic nightly build) with the message and every other nightly build also failed. Somehow this triggered Hudson to continuously build every project which failed until the issue was resolved. This resulted in a build every 30 minutes or so of every project until sometime Saturday night when the issue magically disappeared.

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

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

发布评论

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

评论(5

明媚殇 2024-07-12 00:30:15

我在 Debian 上运行的另一个 Java 应用程序中遇到过这个问题,当我们降级到 Java 版本 1.6.0.0 时,这个问题就消失了。 Java 从未关闭未使用的连接,导致它抛出异常。

I have experienced this problem with another Java application running on Debian, it went away when we downgraded to Java version 1.6.0.0. Java never closed unused connections, causing it to throw the exception.

青芜 2024-07-12 00:30:15

导致“打开文件过多”的最常见问题之一是在 Jenkins 中启用和配置 Active Directory 插件。 该插件存在已知问题,会导致出现大量线程,并且日志中还会出现“打开文件过多”错误。 禁用它并切换到 LDAP 身份验证后,我不再遇到 Jenkins 挂起的情况。

One of the most common problem causing "Too many open files" is to have Active Directory plugin enabled and configured in Jenkins. There are known issues with this plugin which cause enormous number of threads to show up and "Too many open files" error in logs as well. After disabling it and switching to LDAP authentication I did not experience Jenkins to hang anymore.

冷夜 2024-07-12 00:30:15

这是 Hudson 问题 715 (http://issues.hudson-ci.org /browse/HUDSON-715)。 当前的建议是设置“同时轮询线程的最大数量”以降低轮询活动。

This is Hudson issue 715 (http://issues.hudson-ci.org/browse/HUDSON-715). The current recommendation is to set the 'maximum number of simultaneous polling threads' to keep the polling activity down.

凉月流沐 2024-07-12 00:30:15

请参阅 https://wiki .jenkins-ci.org/display/JENKINS/I%27m+getting+too+many+open+files+error 了解我们需要您提供解决此类问题的信息。

See https://wiki.jenkins-ci.org/display/JENKINS/I%27m+getting+too+many+open+files+error for what we need from you to fix this kind of problem.

携君以终年 2024-07-12 00:30:15

更改每个进程最大打开文件描述符的系统限制? 就像 Java 进程的 ulimit -n 一样吗?

Change system limits for per-process maximum open file descriptors? As in ulimit -n for the Java process?

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