首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Grails run-app必须执行两次

Grails run-app必须执行两次
EN

Stack Overflow用户
提问于 2016-04-18 14:57:48
回答 2查看 113关注 0票数 0

我必须运行start-app两次。在第一次运行时,我的控制台报告了一个错误:

代码语言:javascript
复制
| Running application...
Error occurred during initialization of VM
Could not reserve enough space for object heap

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':bootRun'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_77\bin\java.exe'' finished with
non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
| Error Failed to start server (Use --stacktrace to see the full trace)

但在第二次运行时,它运行得很好。有谁能解释一下原因吗?

EN

回答 2

Stack Overflow用户

发布于 2016-04-18 17:46:16

运行JVM with -XX:MaxHeapSize=512m (或任何较大的数字)(或简称-Xmx512m )

票数 0
EN

Stack Overflow用户

发布于 2016-04-21 16:23:47

buildconfig.groovy中的增加mxPerm和maxMemory的值

代码语言:javascript
复制
grails.project.fork = [
    // configure settings for compilation JVM, note that if you alter the Groovy version forked compilation is required
    //  compile: [maxMemory: 256, minMemory: 64, debug: false, maxPerm: 256, daemon:true],

    // configure settings for the test-app JVM, uses the daemon by default
    test: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, daemon:true],
    // configure settings for the run-app JVM
    run: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
    // configure settings for the run-war JVM
    war: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256, forkReserve:false],
    // configure settings for the Console UI JVM
    console: [maxMemory: 768, minMemory: 64, debug: false, maxPerm: 256]
]
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36687274

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档