Server exception
10-Aug-2022 10:59:30.517 INFO [Catalina-utility-2] org.apache.catalina.users.MemoryUserDatabase.backgroundProcess Reloading memory user database [UserDatabase] from updated source [file:/tomcat/conf/tomcat-users.xml] 10-Aug-2022 10:59:30.517 SEVERE [Catalina-utility-2] org.apache.catalina.users.MemoryUserDatabase.open The specified user database [conf/tomcat-users.xml] could not be found 10-Aug-2022 10:59:30.696 SEVERE [https-jsse-nio-8443-Acceptor] org.apache.tomcat.util.net.Acceptor.run Socket accept failed java.io.IOException: Too many open files at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:421) at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:249) at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:546) at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:79) at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:129) at java.lang.Thread.run(Thread.java:750)
Server version: Apache Tomcat/9.0.63
Server built: May 11 2022 07:52:11 UTC
Server number: 9.0.63.0
OS Name: Linux
OS Version: 3.10.0-1160.71.1.el7.x86_64
Architecture: amd64
JVM Version: 1.8.0_332-b09
JVM Vendor: Red Hat, Inc.
After migration from tomcat 7 to tomcat 9. then randomly seen this exception.
Analysis
It is same webapp code from tomcat 7 to tomcat 9 so resource are closed properly with try and finally block as we have not seen the exception in tomcat 7.
Some places it is mentioned as increase in ulimit but not sure what is cause for this.