KB-1044 "java.io.FileNotFoundException: /XXX/filename.ext (Too many open files)" error thrown on Linux

Symptoms

The following error is shown in the application server log:

2015-08-17 09:44:37,569 [http-/0.0.0.0:8080-8] ERROR com.appiancorp.kougar.mapper.parameters.BeanParameterConverter - unexpected exception while accessing property  in 
java.io.FileNotFoundException: /XXX/filename.ext (Too many open files)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(FileInputStream.java:195)
    at java.io.FileInputStream.(FileInputStream.java:138)
    at java.io.FileInputStream.(FileInputStream.java:93)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
    at java.net.URLConnection.getContent(URLConnection.java:739)
    at java.net.URL.getContent(URL.java:1052)
    at sun.reflect.GeneratedMethodAccessor5594.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.appiancorp.kougar.mapper.parameters.BeanParameterConverter.convert(BeanParameterConverter.java:44)
    at com.appiancorp.kougar.mapper.parameters.ArrayParameterConverter.convert(ArrayParameterConverter.java:25)

Cause

The application server machine has reached the maximum number of open files.

Action

Increase the maximum allowable number of file descriptors available to the user running Appian. The recommendation is 100000.

  1. Check the current value of the maximum allowable number of file descriptors:

    ulimit -n
    

     

  2. If the value returned from previous step is less than 100000, then increase the limit.

  • For a temporary solution (configuration will be reset after a server restart), run the following command:

    ulimit -n 100000 
    

     

  • For a permanent solution (configuration persists after a server restart), add the following to /etc/security/limits.conf:

    *      hard    nofile      100000
    *      soft    nofile      100000
    

     

Refer to Increase Maximum Open File Limit for the Application User Account for more information.

Affected Versions

This article applies to all versions of Appian installed on Unix-based operating systems.

Last Reviewed: October 2015

Related
Recommended