我正在尝试使用嵌入式码头(版本8)在heroku的1x dyno中通过Codeship CI流程部署Spring MVC应用程序。
Codeship流程有效,但在部署步骤R14和R10中出现了heroku错误。
我已经在我的本地尝试了相同的java参数,它在15-20秒内部署得很好。
可能是什么原因?
web: java -Dserver.port=$PORT $JAVA_OPTS -jar target/dependency/jetty-runner.jar target/*.war
java.runtime.version=1.7
2014-09-06T16:12:07.070516+00:00 heroku[web.1]: Starting process with command `java -Dserver.port=17223 -Xmx384m -Xms384m -Xss512k -XX:+UseCompressedOops -jar target/dependency/jetty-runner.jar target/*.war`
2014-09-06T16:12:07.698033+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Djava.rmi.server.useCodebaseOnly=true -Djava.rmi.server.useCodebaseOnly=true
2014-09-06T16:12:08.350797+00:00 app[web.1]: 2014-09-06 16:12:08.349:INFO:omjr.Runner:Runner
2014-09-06T16:12:08.350934+00:00 app[web.1]: 2014-09-06 16:12:08.350:WARN:omjr.Runner:No tx manager found
2014-09-06T16:12:08.454514+00:00 app[web.1]: 2014-09-06 16:12:08.454:INFO:omjr.Runner:Deploying file:/app/target/MagmaInside221B.war @ /
2014-09-06T16:12:08.477820+00:00 app[web.1]: 2014-09-06 16:12:08.477:INFO:oejs.Server:jetty-8.y.z-SNAPSHOT
2014-09-06T16:12:08.607664+00:00 app[web.1]: 2014-09-06 16:12:08.607:INFO:oejw.WebInfConfiguration:Extract jar:file:/app/target/MagmaInside221B.war!/ to /app/target/MagmaInside221B
2014-09-06T16:12:19.847416+00:00 app[web.1]: 2014-09-06 16:12:19.847:INFO:oejpw.PlusConfiguration:No Transaction manager found - if your webapp requires one, please configure one.
2014-09-06T16:12:23.593483+00:00 heroku[web.1]: source=web.1 dyno=heroku.29253714.85382d49-d1fa-4998-86f7-12cea60f83a4 sample#memory_total=319.66MB sample#memory_rss=234.84MB sample#memory_cache=84.83MB sample#memory_swap=0.00MB sample#memory_pgpgin=97083pages sample#memory_pgpgout=15249pages
2014-09-06T16:12:44.726949+00:00 heroku[web.1]: source=web.1 dyno=heroku.29253714.85382d49-d1fa-4998-86f7-12cea60f83a4 sample#memory_total=557.48MB sample#memory_rss=511.58MB sample#memory_cache=0.33MB sample#memory_swap=45.57MB sample#memory_pgpgin=199724pages sample#memory_pgpgout=68675pages
2014-09-06T16:12:44.727477+00:00 heroku[web.1]: Process running mem=557M(108.9%)
2014-09-06T16:12:44.727730+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2014-09-06T16:13:05.520637+00:00 heroku[web.1]: source=web.1 dyno=heroku.29253714.85382d49-d1fa-4998-86f7-12cea60f83a4 sample#load_avg_1m=1.20
2014-09-06T16:13:05.520729+00:00 heroku[web.1]: source=web.1 dyno=heroku.29253714.85382d49-d1fa-4998-86f7-12cea60f83a4 sample#memory_total=635.76MB sample#memory_rss=511.89MB sample#memory_cache=0.11MB sample#memory_swap=123.77MB sample#memory_pgpgin=250735pages sample#memory_pgpgout=119665pages
2014-09-06T16:13:05.521268+00:00 heroku[web.1]: Process running mem=635M(124.2%)
2014-09-06T16:13:05.521494+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2014-09-06T16:13:07.096312+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2014-09-06T16:13:07.096536+00:00 heroku[web.1]: Stopping process with SIGKILL
2014-09-06T16:13:07.998339+00:00 heroku[web.1]: Process exited with status 137
2014-09-06T16:13:08.009655+00:00 heroku[web.1]: State changed from starting to crashed
答案 0 :(得分:2)
您已超出配置的dyno的Heroku内存限制。这与您的部署方式无关(即,当您从本地计算机上推送时也会发生这种情况)。至于解决这个问题,您需要升级到更强大的dyno或减少应用程序的内存占用。
免责声明,我在为Codeship工作。我通过我们的应用内支持工具与Antonio交谈,我们解决了这个问题,但我也想提供一个公开的答案。