Yeggy,
On 5/17/21 15:17, Yeggy Javadi wrote:
Hi,
I am seeing too many TCP sockets open by tomcat on Oracle Linux 8:
java 51798 root 6601u sock 0,9 0t0 3959342 protocol:
TCPv6
I was running the same application on Linux 7.6 with the same apache-tomcat
version without seeing this issue. I saw that RedHat has remove apache-tomcat
fom their Linux 8 distribution. Please help with throubleshooting and
indicating if there is any changes in Linux 8 that can explain this
Configuration:
apache-tomcat-8.5.59
OEL Linux 8 kernel 4.18.0-193.28.1.el8_2.x86_64
Web-based application using Postgres and elastic search databases
# ps -ef | grep tomcat
root 51798 1 1 11:16 ? 00:06:01 /usr/local/jre/bin/java
-Djava.util.logging.config.file=/usr/local/apache-tomcat/conf/logging.properties
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -d64 -server
-Xms1800m -Xmx8192m -XX:MaxMetaspaceSize=1800m
-Djdk.tls.ephemeralDHKeySize=2048
-Djava.protocol.handler.pkgs=org.apache.catalina.webresources
-Dorg.apache.catalina.security.SecurityListener.UMASK=0027
-Dignore.endorsed.dirs= -classpath
/usr/local/apache-tomcat/bin/bootstrap.jar:/usr/local/apache-tomcat/bin/tomcat-juli.jar
-Dcatalina.base=/usr/local/apache-tomcat
-Dcatalina.home=/usr/local/apache-tomcat
-Djava.io.tmpdir=/usr/local/apache-tomcat/temp
org.apache.catalina.startup.Bootstrap start
root 54122 54037 0 19:43 pts/1 00:00:00 grep --color=auto tomcat
# cat /proc/51798/limits
Limit Soft Limit Hard Limit Units
Max cpu time unlimited unlimited seconds
Max file size unlimited unlimited bytes
Max data size unlimited unlimited bytes
Max stack size 8388608 unlimited bytes
Max core file size unlimited unlimited bytes
Max resident set unlimited unlimited bytes
Max processes 256518 256518 processes
Max open files 262144 262144 files
Max locked memory 65536 65536 bytes
Max address space unlimited unlimited bytes
Max file locks unlimited unlimited locks
Max pending signals 256518 256518 signals
Max msgqueue size 819200 819200 bytes
Max nice priority 0 0
Max realtime priority 0 0
Max realtime timeout unlimited unlimited us
Too may open files:
# lsof -p 51798 | wc -l
6679
Most of open files are TCP sockets:
java 51798 root 6601u sock 0,9 0t0 3959342 protocol:
TCPv6
# lsof -p 51798 | grep "protocol: TCPv6" | wc -l
6413
Some potentially dumb questions:
1. Did you upgrade anything recently (like Java VM)?
2. What is error you are seeing? A full stack trace would be helpful.
3. What is your <Connector> configuration?
4. Are you counting all the open files for a single process or all of
the sub-processes which represent the threads of the main process?
Different kernel versions count things differently.
5. Running lsof, netstat, etc. can you see if some large number of those
sockets are bound to any specific port (listen or connect)?
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org