tomcat 配置jvm参数

tomcat 配置

  • for windows
    set JAVA_OPTS =-server -Xms512m -Xmx512m -XX:PermSize=128M -XX:MaxNewSize=256m -XX:MaxPermSize=256m -Djava.awt.headless=true
  • for unix
    JAVA_OPTS="-Xms768m -Xmx768m -XX:PermSize=256m -XX:MaxNewSize=256m -XX:MaxPermSize=256m $JAVA_OPTS -Djava.awt.headless=true"
    export JAVA_OPTS

Tomcat has a memory leak

Tomcat has a memory leak where large JSP page requests can fill up memory.
To avoid this, edit Tomcat's bin/setenv.sh (create it if it does not exist) and set:

export CATALINA_OPTS="$CATALINA_OPTS -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true"

你可能感兴趣的:(tomcat 配置jvm参数)