运行 上的 Play Framework 2.3 jvm 内存
Play Framework 2.3 jvm memory on run
我正在尝试增加我的应用程序的 Jvm 内存,但无论我使用什么,我都得到 256Mb 作为最大内存。查看我使用的最大内存
val instance = Runtime.getRuntime();
val mb = 1024 * 1024;
val maxm = ("Max Memory: " + instance.maxMemory() / mb);
我尝试 运行 使用...
应用程序
activator -Xms512M -Xmx512M run
activator -mem 512 -J-server run //this doesn't run
env JAVA_OPTS="-Xms512m -Xmx512m" && activator run
env JAVA_OPTS="-mem 512" && activator run
env JAVA_OPTS="-XX:MetaspaceSize=64M -XX:MaxMetaspaceSize=512M" && activator run
env JAVA_OPTS="-DX:MetaspaceSize=64m -DX:MaxMetaspaceSize=512m" && activator run
使用 activator -mem 512 运行 或 activator -mem 512 -J-server 运行 时出现以下错误。
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
[error] Expected letter
[error] Expected symbol
[error] Expected '!'
[error] Expected '+'
[error] Expected '++'
[error] Expected 'debug'
[error] Expected 'info'
[error] Expected 'warn'
[error] Expected 'error'
[error] Expected ';'
[error] Expected end of input.
[error] Expected '--'
[error] Expected 'show'
[error] Expected 'all'
[error] Expected '*'
[error] Expected '{'
[error] Expected project ID
[error] Expected configuration
[error] Expected key
[error] Expected '-'
[error] 512
[error] ^
[error] Not a valid command: mem (similar: set)
[error] Not a valid project ID: mem
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: mem (similar: name, makePom, make-pom)
[error] mem
[error] ^
我是不是做错了?
通过使用 SET 而不是 ENV 并删除双引号解决。
set JAVA_OPTS=-Xms64m -Xmx512m && activator run
=)
我正在尝试增加我的应用程序的 Jvm 内存,但无论我使用什么,我都得到 256Mb 作为最大内存。查看我使用的最大内存
val instance = Runtime.getRuntime();
val mb = 1024 * 1024;
val maxm = ("Max Memory: " + instance.maxMemory() / mb);
我尝试 运行 使用...
应用程序activator -Xms512M -Xmx512M run
activator -mem 512 -J-server run //this doesn't run
env JAVA_OPTS="-Xms512m -Xmx512m" && activator run
env JAVA_OPTS="-mem 512" && activator run
env JAVA_OPTS="-XX:MetaspaceSize=64M -XX:MaxMetaspaceSize=512M" && activator run
env JAVA_OPTS="-DX:MetaspaceSize=64m -DX:MaxMetaspaceSize=512m" && activator run
使用 activator -mem 512 运行 或 activator -mem 512 -J-server 运行 时出现以下错误。
[warn] The `-` command is deprecated in favor of `onFailure` and will be removed in 0.14.0
[error] Expected letter
[error] Expected symbol
[error] Expected '!'
[error] Expected '+'
[error] Expected '++'
[error] Expected 'debug'
[error] Expected 'info'
[error] Expected 'warn'
[error] Expected 'error'
[error] Expected ';'
[error] Expected end of input.
[error] Expected '--'
[error] Expected 'show'
[error] Expected 'all'
[error] Expected '*'
[error] Expected '{'
[error] Expected project ID
[error] Expected configuration
[error] Expected key
[error] Expected '-'
[error] 512
[error] ^
[error] Not a valid command: mem (similar: set)
[error] Not a valid project ID: mem
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: mem (similar: name, makePom, make-pom)
[error] mem
[error] ^
我是不是做错了?
通过使用 SET 而不是 ENV 并删除双引号解决。
set JAVA_OPTS=-Xms64m -Xmx512m && activator run
=)