在构建新的本地目录以在本地容纳应用程序后,是否有人在 Heroku 上崩溃的新部署的经验



我最近将工作(首次发布(Web 应用程序的 github 存储库克隆到我计算机上的新目录和新用户。该网络应用程序托管在Heroku。

我做了一些更改,将它们推送到origin,然后将它们推送到 Heroku,Web 应用程序崩溃。这些更改非常小,不会影响任何后端或复杂内容。

Heroku说构建是成功的,确实存在一个明显的警告:

###### WARNING:
       Detecting rails configuration failed
       set HEROKU_DEBUG_RAILS_RUNNER=1 to debug
###### WARNING:
       We detected that some binary dependencies required to
       use all the preview features of Active Storage are not
       present on this system.
       For more information please see:
         https://devcenter.heroku.com/articles/active-storage-on-heroku

不知道他们所说的set HEROKU_DEBUG_RAILS_RUNNER=1 to debug是什么意思和在哪里

我在崩溃期间收到的错误日志是:

...
2019-06-01T07:14:31.564617+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/training_sessions/345" host=www.trainingrepo.com request_id=ed87114f-a296-4a84-adba-57f7249d3ea9 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:14:32.159379+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=www.trainingrepo.com request_id=990ffa88-1d6b-4e38-af9b-521b2dff6fa8 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:14:41.170353+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=www.trainingrepo.com request_id=14e1d219-30e5-4b87-96cf-3ea9378c13e1 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:14:41.642669+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=www.trainingrepo.com request_id=54ad17ed-5e6c-44ff-818a-f7e4fcd6720a fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:14:44.421786+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/training_sessions/345" host=www.trainingrepo.com request_id=418bea73-f5b8-44bf-8233-6751b481d671 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:14:44.724359+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=www.trainingrepo.com request_id=a6226248-404a-4a25-8144-7bf923c362d1 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=http
2019-06-01T07:16:15.084500+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=training-repo.herokuapp.com request_id=aeb650e9-57bb-4d60-b095-cc426a2f7a48 fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=https
2019-06-01T07:16:15.468246+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=training-repo.herokuapp.com request_id=17442b02-84a1-4e2d-a3d2-04f26e2bd8ef fwd="81.226.11.112" dyno= connect= service= status=503 bytes= protocol=https

您会注意到dyno= connect= service=都是空的。当我嘶吼生产检查时,这是一场血洗:

PASSED Heroku-18 Stack
FAILED Hobby Dynos
You're running on Hobby dynos. Upgrading to Standard tier dynos will provide a higher level of performance and access to important features such as metrics and faster builds. Upgrading to Performance will provide single tenant isolation for highest performance. Visit your app's resources tab to upgrade.
FAILED Dyno Redundancy
You're only running on 1 web dyno. A second dyno will provide instant fallback if one dyno fails for any reason. Scale your dynos to 2 or more on the Resources tab.
FAILED Production Postgres Database
Using a Hobby Tier Postgres database. Upgrade to a Standard or Premium Tier database for production-grade availability.
WARNING Postgres High Availability
Using a Hobby Tier Postgres database. Upgrade to a Premium Tier database for High Availability.
FAILED App monitoring
Not using an app monitoring add-on. Install a monitoring add-on such as New Relic or Librato to monitor your app's performance.
FAILED Log monitoring
No logging add-on found. Install a logging add-on such as Papertrail,or Logentriesto monitor and search your logs.
WARNING Custom Maintenance Pages
Configure customized error and maintenance pages to match your app's branding.
PASSED Heroku SSL

另外值得注意的是:我无法在本地连接到我的数据库 - 我猜这与我尝试从计算机上的新用户帐户访问它有关 - 但我是个笨蛋

如果不看你的代码,很难说发生了什么,但这行非常能说明问题:Detecting rails configuration failed。对于一个普通的Rails应用程序来说,这不应该发生。半可选配置中的其他内容。

您可以尝试检查是否推错了文件夹级别 - 一步太高或太低。确保推送RAILS_ROOT文件夹 - 其中包含Gemfile的文件夹。如果您在 Github 上打开您的项目,您应该会看到 Gemfile 直接列在第一个屏幕中。

最新更新