1. SPEForums need your contributions to build up a strong repository of performance engineering resources.

    Dismiss Notice
Dismiss Notice
Hello Guest,

Please reach out to us at anmldubey@gmail.com in case you face any issues with SPEForums. Share your feedback - Click Here

Please support us by sharing performance engineering tutorials/resources with SPEForums.com


Why Tomcat not releasing files [Too many open files error] (oracle APEX -> Tomcat)

Discussion in 'General Discussions' started by camillelola, Aug 8, 2018.

  1. camillelola

    camillelola New Member

    Aug 8, 2018
    Likes Received:
    I am working as an Oracle developer. Recently I am facing an issue with tomcat where I keep getting "Too many open files"
    25-Jul-2018 08:17:49.504 SEVERE [http-nio-443-exec-31] . /u01/app/ords/ords. Too many open files
    java.nio.file.FileSystemException: /u01/app/ords/ords. Too many open files
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
        at java.nio.file.Files.newByteChannel(Files.java:361)
    I have tried raising the ulimit for open files to 65536 but all this does is prolong the error.
    tomcat@tomcatserver():/home/tomcat> ulimit -a | grep open
    open files                      (-n) 65536
    I have found that the error is coming from an apex application that polling the database for changes. The application polls every 3 seconds. if I watch the file count lsof | grep tomcat | wc-l I can see the number increasing while the app is open and then stays steady when closed. and when there are multiple sessions open this number can grow pretty rapidly.

    Is there some config value I can set in the server.xml or something on the apex side that will limit the number of files it keeps open? any help will be greatly appreciated.

    NOTE. The connections from the application are being closed. I can see this by doing.netstat -a | grep client_hostname I can see an extra connection coming in every 3 seconds and then be disappearing.

    Thanks & Regards
    #1 camillelola, Aug 8, 2018
    Last edited by a moderator: Aug 15, 2018
  2. amitbose

    amitbose Member

    Aug 13, 2014
    Likes Received:
    @camillelola what is the os on which tomcat is deployed? did you manage to find a solution?

Share This Page