把tomcat服务器java最大内存使用量调整为512m,有如下两种方式: 【1】设置环境变量 [root@WWW root]# vi .bash_profile 添加 export JAVA_OPTS="-mx512m -ms128m ",重启tomcat 【2】编辑catalina.sh文件 在tomcat_home/bin/catalina.sh 这个文件里 找到下面: # ----- Execute The Requested Command ----------------------------------------- echo "Using CATALINA_BASE: $CATALINA_BASE" echo "Using CATALINA_HOME: $CATALINA_HOME" echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR" echo "Using JAVA_HOME: $JAVA_HOME" 然后增加一行.. # ----- Execute The Requested Command ----------------------------------------- JAVA_OPTS="-server -Xmx512m -Xms128m -Djava.awt.headless=true " echo "Using CATALINA_BASE: $CATALINA_BASE" echo "Using CATALINA_HOME: $CATALINA_HOME" echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR" echo "Using JAVA_HOME: $JAVA_HOME" 最后重启tomcat
调整java分配虚拟内存_Tomcat下java的虚拟内存调整
最新推荐文章于 2024-04-01 15:58:44 发布