【问题标题】:Heroku-Django: code=H14 desc:"No web processes running"Heroku-Django: code=H14 desc:"没有运行 web 进程"
【发布时间】:2020-07-29 08:10:53
【问题描述】:

Heroku 日志

我正在尝试在 heroku 上部署一个 django 应用程序,这是我在 heroku 上部署的第一个应用程序,构建成功但是当我运行 URL 时,它说应用程序错误并且日志显示以下内容。

2020-07-29T07:58:24.000000+00:00 app[api]: Build started by user ketanpatil3106@
gmail.com
2020-07-29T07:58:59.203607+00:00 app[api]: Deploy 26b25759 by user ketanpatil310
6@gmail.com
2020-07-29T07:58:59.203607+00:00 app[api]: Release v6 created by user ketanpatil
3106@gmail.com
2020-07-29T07:59:07.261443+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/" host=newtonnation.herokuapp.com request_i
d=debda95e-c51d-4090-87a9-73102c5c9411 fwd="106.193.222.48" dyno= connect= servi
ce= status=503 bytes= protocol=https
2020-07-29T07:59:09.000000+00:00 app[api]: Build succeeded
2020-07-29T07:59:10.136919+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/favicon.ico" host=newtonnation.herokuapp.co
m request_id=50db9f9b-2e03-4465-b3ba-f851612f3db8 fwd="106.193.222.48" dyno= con
nect= service= status=503 bytes= protocol=https
2020-07-29T07:59:12.539684+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/" host=newtonnation.herokuapp.com request_i
d=22f644fb-4d6f-48ed-a34f-f35d5dd41033 fwd="106.193.222.48" dyno= connect= servi
ce= status=503 bytes= protocol=https
2020-07-29T07:59:13.903721+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/favicon.ico" host=newtonnation.herokuapp.co
m request_id=3dfff95c-dd3c-4590-ad22-2c673a9ec5b9 fwd="106.193.222.48" dyno= con
nect= service= status=503 bytes= protocol=https
2020-07-29T08:04:38.784712+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/" host=newtonnation.herokuapp.com request_i
d=6e61e063-8575-4236-9d87-a1af42058b82 fwd="106.193.222.48" dyno= connect= servi
ce= status=503 bytes= protocol=https
2020-07-29T08:04:41.381297+00:00 heroku[router]: at=error code=H14 desc="No web
processes running" method=GET path="/favicon.ico" host=newtonnation.herokuapp.co
m request_id=ab3bd0e2-5396-4c63-9735-9d0a30f54013 fwd="106.193.222.48" dyno= con
nect= service= status=503 bytes= protocol=https

过程文件:

web: gunicorn PHYSICS_COMMUNITY.wsgi

我试过运行heroku ps:scale web=1,但它返回了Couldn't find that process type (web).

请帮帮我

【问题讨论】:

标签: django heroku


【解决方案1】:

如果成功构建,则问题是启动应用程序。 heroku 默认检查 package.json 中的“start”脚本。

既然你把这个gunicorn PHYSICS_COMMUNITY.wsgi 放在procfile 上,我假设这是生产的启动命令。

你可以在包 json 中设置启动脚本,对我来说这是最简单的方法

   "start":"gunicorn PHYSICS_COMMUNITY.wsgi"

或者我想要 Procfile,问题是你在“web”之后留了一个空白。

 web:gunicorn PHYSICS_COMMUNITY.wsgi

【讨论】:

    【解决方案2】:

    确保您的个人资料位于根目录

    【讨论】:

      猜你喜欢
      • 2015-09-22
      • 2012-04-15
      • 1970-01-01
      • 2017-06-07
      • 1970-01-01
      • 2012-07-09
      • 2021-10-17
      • 2021-10-10
      • 2013-09-04
      相关资源
      最近更新 更多