【发布时间】:2016-06-15 08:19:01
【问题描述】:
使用 Tomcat 启动 grails 时出现此错误
|Running Grails application
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Error |
Forked Grails VM exited with error
我在 startGrails.bat 中设置了 GRAILS_OPTS
set GRAILS_OPTS=-server -Xmx2048M -Xms1024M -XX:PermSize=32m -XX:MaxPermSize=256m
我已将 CATALINA_OPTS 设置为环境变量(因为我使用的是 Tomcat 服务器)
-server -Xms1024m -Xmx2048m -XX:MaxPermSize=256m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Djava.net.preferIPv4Stack=true
我也尝试将 _JAVA_OPTIONS 变量设置为
-Xmx2048M
我还尝试过将 VM 大小作为参数提及并更改 BuildConfig.groovy 中的 grails.project.fork 值,但没有运气。
请帮忙。
【问题讨论】: