【问题标题】:Django site hosting on Heroku "No web processes runnng"在 Heroku 上托管的 Django 站点“没有运行 Web 进程”
【发布时间】:2021-05-20 18:14:26
【问题描述】:

所以我尝试将我的 Django 应用程序托管到 Heroku,并且起初它可以工作。然后我想添加一些发布命令,所以我这样做了:

release_commands.sh

python manage.py makemigrations
python manage.py migrate

在我的 Procfile 中:

release: bash ./release_commands.sh
web: gunicorn todo.wsgi --log-file - 

我的 Procfile 中的第二行没有改变,所以我猜测错误一定来自发布命令,但事实并非如此,因为在我的 heroku 日志中我有这个:

2021-02-17T19:41:31.675215+00:00 heroku[release.6232]: Process exited with status 0
2021-02-17T19:41:31.772693+00:00 heroku[release.6232]: State changed from up to complete
2021-02-17T19:41:34.021990+00:00 app[api]: Release v11 created by user georgi.hr.dim@gmail.com

这是错误信息:

2021-02-17T19:41:43.594322+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=POST path="/accounts/login/?next=/" host=essentialtodo.herokuapp.com request_id=5dce4816-6343-44c3-9c8f
-171e79379abc fwd="78.90.0.206" dyno= connect= service= status=503 bytes= protocol=https

【问题讨论】:

    标签: django heroku procfile


    【解决方案1】:

    刚刚发现问题出在哪里。由于某种原因,在添加了发布命令后,我的测功机被关闭了。要解决此问题:转到您的 heroku 应用程序(在 heroku 网站上)-> 转到资源-> 按您的测功机上的编辑按钮-> 打开它并确认 .

    【讨论】:

      猜你喜欢
      • 2021-03-31
      • 2013-09-04
      • 2012-04-25
      • 2021-02-13
      • 1970-01-01
      • 2017-01-08
      • 2022-10-06
      • 2015-09-22
      • 2021-07-17
      相关资源
      最近更新 更多