0

我正在尝试通过Codeship CI 流在带有嵌入式码头(版本 8)的 heroku 上的 1x dyno 中部署 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

HEROKU 日志

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
4

1 回答 1

3

您超出了配置的测功机的 Heroku 内存限制。这与您的部署方式无关(即,当您从本地计算机推送时也会发生这种情况)。至于解决这个问题,您要么需要升级到更强大的测功机,要么需要减少应用程序的内存占用。

免责声明,我正在为 Codeship 工作。我通过我们的应用内支持工具与 Antonio 进行了交谈,我们解决了这个问题,但我也想提供一个公开的答案。

于 2014-09-08T11:58:32.960 回答