1

我应该使用哪个环境变量向 Tomcat 添加更多 RAM?

JAVA_OPTS="-Xmx1024m -Xms256m"

或者

CATALINA_OPTS="-Xmx1024m -Xms256m"?

4

4 回答 4

2

Either will work. However, from skill-guru...

Note that CATALINA_OPTS is a better place than JAVA_OPTS. The former is only used when actually starting the Tomcat instance. JAVA_OPTS is also used to start JVMs that only interact with Tomcat (for example the JVM instance that is used to send the shutdown-message to a running Tomcat instance).

于 2013-04-05T20:45:47.673 回答
1
于 2013-04-05T20:37:11.920 回答
1

When you'll use CATALINA_OPTS then it's clear that this option is related to Tomcat server. Also when you'll use JAVA_OPTS then any other application could use this settings, and that isn't something that you probably intentionally want to achieve.

于 2014-01-11T19:52:59.500 回答
0

JAVA_OPTS。您正在为 java 命令提供选项,而不是 catalina 选项(它是一个 shell 脚本)。

于 2013-04-05T20:34:26.040 回答