2012-09-16 68 views
1

我收到了「不兼容的最小和最大堆大小指定」編譯器錯誤,試圖將Grails應用程序推送到Heroku。我不知道如何在編譯期間啓用更詳細的日誌記錄,但我很樂意提供更多信息。Heroku Grails buildpack:「不兼容的最小和最大堆大小指定」

506 ita-signup $ git push heroku master 
Counting objects: 31, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (19/19), done. 
Writing objects: 100% (21/21), 2.74 KiB, done. 
Total 21 (delta 11), reused 0 (delta 0) 
-----> Heroku receiving push 
-----> Removing .DS_Store files 
-----> Grails app detected 
-----> Grails 2.0.4 app detected 
WARNING: The Grails buildpack is currently in Beta. 
-----> Executing grails -Divy.default.ivy.user.dir=/app/tmp/repo.git/.cache compile --non-interactive 
Error occurred during initialization of VM 
Incompatible minimum and maximum heap sizes specified 
! Failed to build app 
! Heroku push rejected, failed to compile Grails app 
To [email protected]:XXX-3359.git 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to '[email protected]:XXX-3359.git' 
+0

你是否在某處設置堆大小?你能顯示你的Config和BuildConfig嗎? – GreyBeardedGeek

+0

你能用Heroku提出支持請求嗎? –

+0

@GreyBeardedGeek:我不是故意設置堆大小。 「grails compile」在本地運行時工作正常。應用程序配置是https://github.com/backstop/ita-signup/tree/master/grails-app/conf – withoutairs

回答

4

答:我已經設置了user-env-compile功能。使用這個強制有效的堆設置工作:

$ heroku config:set JAVA_OPTS='-Xms384m -Xmx384m -Xss512k -XX:+UseCompressedOops' 
$ git push heroku master 
... 
(success) 
+0

如果您正在使用像Play一樣的自定義構建包!不要忘記對SBT_OPTS變量進行相同的操作。 'heroku config:set SBT_OPTS =' - Xms384m -Xmx384m -Xss512k -XX:+ UseCompressedOops'' – Lisandro