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

    Dismiss Notice
  2. Whatsapp Group For Software Performance Engineering Professionals!! Click here to get added . No Spam for strictly professional discussions only.
    Dismiss Notice
Dismiss Notice
Hello Guest,

Please reach out to us at admin@speforums.com/+91 8600177662 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

-Crew

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

    Joined:
    Aug 8, 2018
    Messages:
    1
    Likes Received:
    0
    I am working as an Oracle developer. Recently I am facing an issue with tomcat where I keep getting "Too many open files"
    Code:
    25-Jul-2018 08:17:49.504 SEVERE [http-nio-443-exec-31] . /u01/app/ords/ords.18.1.1.95.1251/db_conf/m/url-mapping.xml: Too many open files
    java.nio.file.FileSystemException: /u01/app/ords/ords.18.1.1.95.1251/db_conf/m/url-mapping.xml: 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.
    Code:
    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
    Camillelola
     
    #1 camillelola, Aug 8, 2018
    Last edited by a moderator: Aug 15, 2018
  2. amitbose

    amitbose Member

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

Share This Page