How do you fix the Hudson Too Many Open Files issue?

We use Hudson as a continuous integration system to perform automatic builds (at night and based on a CVS survey) of many of our projects.

Some CVS survey projects every 15 minutes, some other polls every 5 minutes, and some polls every hour.

Every few weeks we get an assembly that does not work 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 wrote it down to two build jobs that ran simultaneously, and it happened that there were too many files during the process.

This weekend we had a failure on Friday night (automatic nightly assembly) with a message, and every other nightly collection also failed. Somehow, this forced Hudson to continuously build every project that failed until the problem was resolved. This led to a build every 30 minutes or so of each project before Saturday night, when the problem magically disappeared.

+6
java exception build-automation continuous-integration hudson
source share
5 answers

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

+4
source share
+3
source share

Change the system limits for the maximum open file descriptors for each process? How in ulimit -n for a Java process?

0
source share

I ran into this problem with another Java application running on Debian, it left when we downgraded to Java version 1.6.0.0. Java never closed unused connections, causing it to throw an exception.

0
source share

One of the most common problems causing "too many open files" is the inclusion and configuration of the Active Directory plugin in Jenkins. There are known problems with this plugin, which lead to a huge number of threads and "too many open files" errors in the logs. After disabling it and switching to LDAP authentication, I no longer experienced Jenkins.

0
source share

All Articles