在tomcat的catalina.sh文件中添加了jconsole检测内存配置

 

 

在tomcat的catalina.sh文件中添加了jconsole检测内存配置

 

CATALINA_OPTS="$CATALINA_OPTS -server -Xms2048m -Xmx2048m -Xmn1300m -XX:MaxPermSize=256m  -XX:HeapDumpPath=./dumpfile.hprof -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC"
export CATALINA_OPTS
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=8881 -Dcom.sun.management.jmxremote.password.file=jmxremote.password -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
export JAVA_OPTS

jmxremote.password文件放到tomcat的bin文件夹下,打开jconsole输入配置及密码进行监控

 

 

tomcat增加线程数

 

    <Connector port="38092" maxHttpHeaderSize="8192"

               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"

               enableLookups="false" redirectPort="38443" acceptCount="100"

               connectionTimeout="20000" disableUploadTimeout="true" URLEncoding="UTF-8"/>

你可能感兴趣的:(JConsole,maxSpareThreads)