部署到Heroku时,Masonite出现错误H10

2024-06-01 04:00:33 发布

您现在位置:Python中文网/ 问答频道 /正文

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

这是Heroku日志中的错误:

2019-01-15T16:55:36.759023+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/api/document/get_from_array?document_kinds,ID_CARD,TAX_ID,SELFIE&profile_id,2&user_id,8&provider_id,6" host=sibyl-core.herokuapp.com request_id=10-12-27161 fwd="196.57.188.111" dyno= connect= service= status=503 bytes= protocol=https

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

以下是本地主机上的响应:

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

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


Tags: id应用程序heroku部署错误errorcarddocument
1条回答
网友
1楼 · 发布于 2024-06-01 04:00:33

大多数情况下,发生这种情况有两个原因:

  1. 您的程序文件不正确
  2. 您的requirements.txt不是最新的

通常是2号,但如果您使用Gunicorn进行部署,则您的程序文件应为:

web: gunicorn wsgi:application

如果您认为正确,则运行:

pip freeze > requirements.txt

然后尝试重新部署。pip freeze将确保您的requirements.txt是当前环境中所有依赖项的最新版本

相关问题 更多 >