Tomcat is opening too many jar files? Any Fix
Recently we deployed one struts application into production, after sometime if we try to find out the list of jar files opened, it showing two many jar files opened can anybody tell me why this happening?
lsof | grep struts
java 9762 root mem REG 253,1 2326673 31850728 /smanne/feat-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root mem REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 47r REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 50r REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 51r REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 53r REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 54u REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 56r REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 57r REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 58r REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 59r REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 60r REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 113r REG 253,1 2326673 31850728 /smanne/feat-01/app/WEB-INF/lib/struts2-core-2.0.14.jar
java 9762 root 120r REG 253,1 2326673 16121954 /smanne/dev-01/app/WEB-INF/lib/struts2-core-2.0开发者_StackOverflow社区.14.jar
java 23871 root mem REG 253,1 2326674 6324271 /reports/dev-01/libs/struts2-core-2.0.14.jar
java 23871 root 6r REG 253,1 2326674 6324271 /reports/dev-01/libs/struts2-core-2.0.14.jar
is there any method to share the jar files?
TOMCAT_HOME\lib\
You can place shared libraries into above dir.
Maybe
- Multiple resources are read from the file
- You do hot deploy and handles are still open from previous application context
EDIT
Well, i'm not a unix guru but i assume "lsof" shows open handles. So, every time a file stream is opened or closed, this will change.
精彩评论