java.io.FileNotFoundException: "FileName" (Too many open files)

Hi.

I have a Bonita Community Server 6.5.2.
I run processes without errors but sometimes I have this error :
java.io.FileNotFoundException: /opt/bonitabpmcommunity/bonita/client/tenants/1/work/theme/portal/images/favicon2.ico (Trop de fichiers ouverts)

When this happen I need to restart the server.

What can I do to prevent this error ?

Here is the full logs I have today :

2015-08-28 09:30:12 org.bonitasoft.console.common.server.servlet.ResourceServlet
GRAVE: Error while generating the response.
java.io.FileNotFoundException: /opt/bonitabpmcommunity/bonita/client/tenants/1/work/theme/portal/images/favicon2.ico (Trop de fichiers ouverts)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:146)
at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:267)
at org.apache.commons.io.FileUtils.readFileToByteArray(FileUtils.java:1490)
at org.bonitasoft.console.common.server.servlet.ResourceServlet.getResourceFile(ResourceServlet.java:182)
at org.bonitasoft.console.common.server.servlet.ResourceServlet.doGet(ResourceServlet.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.bonitasoft.forms.server.filter.ApplicationResourceCacheFilter.doFilter(ApplicationResourceCacheFilter.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.bonitasoft.console.common.server.login.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:115)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

You might need to increase the Linux open files limit.

Also that might indicate an issue in Bonita not properly closing opened files.
Would you mind sharing (in a file) the output of lsof command? (out might need to install it: lsof package)

Thanks

Thanks for this quick answer.

I will see with the server administrator to increase the open files limit and lsof command.

The admin says me that there is only 5504 opened files and the limit is 4000075 files.

cat /proc/sys/fs/file-nr Fri Aug 28 15:29:09 2015

5504 0 400075

I have the same problem. How many files does Bonita need to open when starting the Studio>