将我的Rails应用程序部署到heroku

时间:2018-01-04 18:25:42

标签: ruby-on-rails heroku

我似乎无法在我的rails应用中找到错误。该应用程序工作正常,但经过简单的部署(更改api的一个控制器文件)后,将不会加载单个页面。日志也无济于事:

2018-01-04T18:23:04.899516+00:00 app[web.1]: [4] * Listening on tcp://0.0.0.0:31202
2018-01-04T18:23:04.899701+00:00 app[web.1]: [4] Use Ctrl-C to stop
2018-01-04T18:23:05.040894+00:00 app[web.1]: [4] - Worker 0 (pid: 12) booted, phase: 0
2018-01-04T18:23:05.043093+00:00 app[web.1]: [4] - Worker 1 (pid: 15) booted, phase: 0
2018-01-04T18:23:05.394579+00:00 heroku[web.1]: State changed from starting to up
2018-01-04T18:23:11+00:00 app[heroku-redis]: source=REDIS sample#active-connections=2 sample#load-avg-1m=0.075 sample#load-avg-5m=0.08 sample#load-avg-15m=0.055 sample#read-iops=0 sample#write-iops=0 sample#memory-total=15664468kB sample#memory-free=12572192kB sample#memory-cached=1275064kB sample#memory-redis=300080bytes sample#hit-rate=0.99862 sample#evicted-keys=0
2018-01-04T18:23:45.338930+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=www..com request_id=d5b547d3-a969-4649-a729-66f9db19eb95 fwd="66.87.124.194" dyno= connect= service= status=503 bytes= protocol=https
2018-01-04T18:23:50.649738+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=www..com request_id=25924358-2142-46d0-8186-c516a6bafcb7 fwd="66.87.124.194" dyno= connect= service= status=503 bytes= protocol=https
2018-01-04T18:23:55.958718+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=www..com request_id=0eeb82f8-5bd8-4a95-bd07-8a9e023ae893 fwd="66.87.124.194" dyno= connect= service= status=503 bytes= protocol=https

任何想法?我试过回滚,这似乎没有解决任何问题?

更新

没有做任何事情,它会再次随机启动?为什么会这样?

2018-01-04T18:27:10.443578+00:00 app[web.1]: Started GET "/" for 24.60.204.37 at 2018-01-04 18:27:10 +0000
2018-01-04T18:27:10.572471+00:00 app[web.1]: Processing by StaticPagesController#home_v3 as HTML
2018-01-04T18:27:10.572498+00:00 app[web.1]:   Parameters: {"secure"=>true}

更新2:

它再次退出,但控制台正常工作(heroku run rails c)?

1 个答案:

答案 0 :(得分:3)

这是Heroku目前的一个问题。以下是其事件报告的链接:https://status.heroku.com/incidents/1367

  

自UTC时间约18:10(东部时间下午1:10)以来,应用程序Dynos在发布后无法启动。我们的工程师正在调查这个问题的原因。

编辑可能是巧合,但我定期重新启动我们的应用,现在它又重新启动了。 One person worked around this通过加强非生产实例并将流量路由到它。