我正在尝试在heroku中部署此应用,但无法正常工作。出了什么问题?

问题描述 投票:0回答:1

我正在日志中获取此代码

2019-10-22T23:09:36.638187+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=browserbyfazal.herokuapp.com request_id=70f60e73-bc5f-499e-acbd-a0e08bed5d06 fwd="71.201.83.129" dyno= connect= service= status=503 bytes= protocol=https
2019-10-22T23:09:38.102978+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=browserbyfazal.herokuapp.com request_id=19e5cbf2-7b37-4c59-94d6-2df4c850a8eb fwd="71.201.83.129" dyno= connect= service= status=503 bytes= protocol=https
2019-10-22T23:09:46.400999+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=browserbyfazal.herokuapp.com request_id=407d3137-1fb9-4145-b6e1-8611d3d5eb78 fwd="71.201.83.129" dyno= connect= service= status=503 bytes= protocol=https
2019-10-22T23:09:46.922086+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=browserbyfazal.herokuapp.com request_id=1d143784-1e70-4a10-83c2-d770f26b08a8 fwd="71.201.83.129" dyno= connect= service= status=503 bytes= protocol=https
2019-10-22T23:10:55.624245+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=browserbyfazal.herokuapp.com request_id=71011b13-643c-4857-b130-d2f52460d216 fwd="71.201.83.129" dyno= connect= service= status=503 bytes= protocol=https
2019-10-22T23:10:56.595624+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=browserbyfazal.herokuapp.com request_id=507bec1e-3d4c-4bfe-9528-ea96a5b9c4b4 fwd="71.201.83.129" dyno= connect= service= status=503 bytes= protocol=https
heroku
1个回答
0
投票

来自https://artsy.github.io/blog/2012/12/13/beat-heroku-60-seconds-application-boot-timeout-with-a-proxy/

Heroku将在Web进程占用资源时记录R10-引导超时错误长于60秒以绑定到其分配的端口。这个错误是通常是由于某个进程无法访问外部资源,例如数据库,或者因为您的Gemfile中有很多宝石这需要很长时间才能加载。

一些可能的修复:

1)您是否在Procfile中正确包含了端口号?请提供Procfile进行检查。

2)您应该在:required => false中将Gemfile添加到大多数宝石中。唯一不具有:required => false的宝石是在引导时绝对必要的宝石。需要时,其他所有内容都会动态加载。

3)尝试使用此探查器工具来确定启动所需时间最长的Gems。

4)其他可能是外部连接在引导过程中花费很长时间。同样,在这里您可能不需要在引导时执行操作,并且可以将操作推迟到后台作业。

© www.soinside.com 2019 - 2024. All rights reserved.