【问题标题】:Masonite getting error H10 when deploying to HerokuMasonite 在部署到 Heroku 时出现错误 H10
【发布时间】:2019-06-12 00:47:49
【问题描述】:

我正在将我的 Masonite 应用程序部署到 Heroku,但它一直说应用程序崩溃了。

这是 Heroku 日志中的错误:

2019-01-15T16:55:36.759023+00:00 heroku[路由器]: at=error code=H10 desc="应用程序崩溃" 方法=GET path="/api/document/get_from_array?document_kinds,ID_CARD,TAX_ID,SELFIE&profile_id,2&user_id,8&provider_id,6" 主机=sibyl-core.herokuapp.com request_id=10-12-27161 fwd="196.57.1​​88.111" dyno=连接=服务=状态=503字节=协议=https

这适用于 localhost 但不适用于 Heroku。

这是响应在 localhost 上显示的内容:

{
    "ID_CARD": [],
    "TAX_ID": [],
    "SELFIE": []
}

我正在为我的 WSGI 服务器使用 Gunicorn。

【问题讨论】:

    标签: python frameworks masonite


    【解决方案1】:

    发生这种情况的原因有两个:

    1. 您的 Procfile 不正确
    2. 您的 requirements.txt 不是最新的。

    通常它是 2 号,但如果您使用 Gunicorn 进行部署,那么您的 procfile 应该是:

    web: gunicorn wsgi:application
    

    如果你觉得正确,那么运行:

    pip freeze > requirements.txt
    

    然后尝试重新部署。 pip freeze 将确保您的 requirements.txt 与当前环境中的所有依赖项保持同步。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-06
      • 2021-11-27
      • 1970-01-01
      • 2021-03-20
      相关资源
      最近更新 更多