Too Many Open Files with Hudson

November 15, 2010

I was getting an error during the build of my java project though Hudson, which was saying:

ZoneInfo: /usr/java/jdk1.6.0_22/jre/lib/zi/ZoneInfoMappings (Too many open files)

Looking around, this was caused because my user had too many files open (surprise, surprise!)

$ cat /proc/sys/fs/file-max
387511

gives the the total number of file handles available on the machine. I couldn't see that I was hitting this.

However,

 $ ulimit -n
1024

gives the number of file handles available to the currently logged in user. 1024 is a bit low, given the complexity of my code.

I was on fedora 14, the way to change this is to edit /etc/security/limits.conf and add:

hudson hard nofile 4096

References

Tags: hudson fedora