我必须运行start-app两次。在第一次运行时,我的控制台报告了一个错误:
| 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)但在第二次运行时,它运行得很好。有谁能解释一下原因吗?
发布于 2016-04-18 17:46:16
运行JVM with -XX:MaxHeapSize=512m (或任何较大的数字)(或简称-Xmx512m )
发布于 2016-04-21 16:23:47
buildconfig.groovy中的增加mxPerm和maxMemory的值
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]
]https://stackoverflow.com/questions/36687274
复制相似问题