cancel
Showing results for 
Search instead for 
Did you mean: 

Error - Too many open files

udaygarikapati
Champ in-the-making
Champ in-the-making
Hi All,

When I am trying the uploading content into repository and applying rules on them, I frequently encountering this error :

(Too many open files)

Any idea where I am doing wrong or is it a problem with ALfresco.

Oct 5, 2006 7:43:09 PM org.apache.catalina.loader.WebappClassLoader openJARs
WARNING: Failed to open JAR
java.util.zip.ZipException: Too many open files
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:203)
        at java.util.jar.JarFile.<init>(JarFile.java:132)
        at java.util.jar.JarFile.<init>(JarFile.java:97)
        at org.apache.catalina.loader.WebappClassLoader.openJARs(WebappClassLoader.java:1561)
        at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1792)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1587)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:856)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1305)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1187)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector.run(ThreadPoolAsynchronousRunner.java:443)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

Thanks,
Uday Garikapati
4 REPLIES 4

gavinc
Champ in-the-making
Champ in-the-making
Are you running on Linux by any chance?

If so, this could be caused by the ulimit being set too low. ulimit needs to be 2048 at least (ulimit -n 2048).  Our guess is that it isn't even 1024 here (check with ulimit -a). 

At any rate, it is a max open files per process/user/machine that is the issue.

udaygarikapati
Champ in-the-making
Champ in-the-making
Hi Gavin,

Ya iam running my alfresco on linux. The OS is CentOS, RAM is 4 GB.
When i do ulimit -n, it shows me 1024. But no idea on how can i append
that to more than 2048? Can you tell me how much the alfresco needs,
is 2048 is ok or its supposed to be more than that ?

After checkign the CentOS forums, i found this link
http://lists.centos.org/pipermail/centos/2005-February/045072.html
but the way he suggests, is not there, so i have to do some explicit settings.

No idea on how to do this, but will give it a try.

Any suggestions are welcome.

Thanks,
Uday Garikapati

michaelc
Champ on-the-rise
Champ on-the-rise
Hi Gavin,

Ya iam running my alfresco on linux. The OS is CentOS, RAM is 4 GB.
When i do ulimit -n, it shows me 1024. But no idea on how can i append
that to more than 2048? Can you tell me how much the alfresco needs,
is 2048 is ok or its supposed to be more than that ?

After checkign the CentOS forums, i found this link
http://lists.centos.org/pipermail/centos/2005-February/045072.html
but the way he suggests, is not there, so i have to do some explicit settings.

No idea on how to do this, but will give it a try.

Any suggestions are welcome.

Thanks,
Uday Garikapati

Try ulimit -n 4046

iblanco
Confirmed Champ
Confirmed Champ
That is in Debian or Ubuntu in case it helps you:

- check what is the user running tomcat
- edit /etc/security/limits.conf and add to it this:


<tomcat-user>   soft   nofile      2048
<tomcat-user>   hard   nofile      8192

The first line sets the soft limit (the initial limit), the second the hard limit (the limit that the application itself can request).

- Then restart tomcat and that should be all.

You can check that the limit is up by searching about limits of open files over the JMX dump page of your alfresco installation: http://localhost:8080/alfresco/faces/jsp/admin/jmx-dumper.jsp