当前位置: 首页 > 知识库问答 >
问题:

heroku中没有运行Django的web进程

闻人志
2023-03-14

我试图在heroku中部署我的应用程序,但当我最终尝试在heroku中运行我的应用程序时,我在浏览器中看到了这个:

Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details.

当我看到我的日志时,我会看到下一个:

2013-08-31T19:53:30.672416+00:00 heroku[api]: Enable Logplex by user@example.com
2013-08-31T19:53:30.700218+00:00 heroku[api]: Release v2 created by user@example.com
2013-08-31T19:58:41+00:00 heroku[slug-compiler]: Slug compilation started
2013-08-31T20:04:12.967456+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=502 bytes=
2013-08-31T20:04:13.161016+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/favicon.ico host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=502 bytes=
2013-08-31T20:13:46+00:00 heroku[slug-compiler]: Slug compilation timed out: 904.285527871 seconds.
2013-08-31T20:22:52.646361+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=502 bytes=
2013-08-31T20:22:55.043424+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/favicon.ico host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=502 bytes=
2013-08-31T20:26:14+00:00 heroku[slug-compiler]: Slug compilation started
2013-08-31T20:38:41+00:00 heroku[slug-compiler]: Slug compilation started
2013-08-31T20:41:22+00:00 heroku[slug-compiler]: Slug compilation timed out: 908.241350492 seconds.
2013-08-31T20:49:24.238496+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/ host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=502 bytes=
2013-08-31T20:49:24.644910+00:00 heroku[router]: at=info code= desc="Blank app" method=GET path=/favicon.ico host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=502 bytes=
2013-08-31T20:53:47+00:00 heroku[slug-compiler]: Slug compilation timed out: 907.148099965 seconds.
2013-08-31T20:56:59+00:00 heroku[slug-compiler]: Slug compilation started
2013-08-31T20:58:50.641624+00:00 heroku[api]: Attach HEROKU_POSTGRESQL_AQUA resource by user@example.com
2013-08-31T20:58:50.658435+00:00 heroku[api]: Release v3 created by user@example.com
2013-08-31T20:58:50.742803+00:00 heroku[api]: Add DATABASE_URL config by user@example.com
2013-08-31T20:58:50.782484+00:00 heroku[api]: Release v4 created by user@example.com
2013-08-31T20:58:50.840509+00:00 heroku[api]: Deploy 78dba6c by user@example.com
2013-08-31T20:58:50.852187+00:00 heroku[api]: Release v5 created by user@example.com
2013-08-31T20:58:54+00:00 heroku[slug-compiler]: Slug compilation finished
2013-08-31T21:00:25.085053+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path=/favicon.ico host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=503 bytes=
2013-08-31T21:00:24.751074+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path=/ host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=503 bytes=
2013-08-31T21:01:03.272614+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path=/ host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=503 bytes=
2013-08-31T21:01:03.815558+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path=/favicon.ico host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=503 bytes=
2013-08-31T21:02:10.279054+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path=/ host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=503 bytes=
2013-08-31T21:03:25.381362+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path=/ host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=503 bytes=
2013-08-31T21:03:25.709121+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path=/favicon.ico host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=503 bytes=
2013-08-31T21:03:45.285962+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path=/favicon.ico host=cristowip.herokuapp.com fwd="189.137.81.39" dyno= connect= service= status=503 bytes=
christian@christian-R480-R431-R481:~/Documentos/heroku/portafolio/venv$ 

共有3个答案

慕胡媚
2023-03-14

你看过Heroku指南中关于设置Django应用程序的内容了吗?你的proc文件是什么样子的?

您的项目应该有一个名为Procfile的文件,该文件的内容应该与

web: gunicorn hellodjango.wsgi
陶富
2023-03-14

添加proc文件并运行以下命令

$heroku ps:scale web=1

梁磊
2023-03-14

本杰明·曼斯的解决方案对我有效,尽管我也需要一个额外的步骤。

据此,推送Procfile解决方案后,运行以下操作:

heroku ps:scale web=1

网站现在应该可以正确加载了。

有关推动heroku git回购的更多帮助,请参见此

 类似资料:
  • 在当地没有问题。 该应用程序已部署到heroku,但我收到一个错误屏幕。在我得到的日志中: heroku[router]:at=error code=H14 desc=“没有正在运行的web进程”method=GET path=“/”host=catan manager api。希罗库普。com request_id=c68d7131-7572-4fe6-ae9d-13836519e25c fwd

  • 我目前正在开发一个部署在heroku中的Spring Boot应用程序。该应用程序在同一回购协议上有两个主要项目(前端和后端)。我设法用node运行了前端。js和(技术上)也成功地运行了spring boot应用程序。 根据日志,一切似乎都正常,但当我访问应用程序时,它返回一个HTTP 500,声称没有运行Web进程。 但当我和heroku ps联系时 这是我的文件: 它声明两个进程(一个用于前端

  • 我有一个Django应用程序,当我在本地运行它时,它就会工作。当我把我的代码推到heroku时,它会毫无问题地推,但当我打开我的网站时,它在控制台中显示503错误 at=错误代码=H14 desc="没有运行的Web进程"方法=GET路径="/"host=omylibrary.herokuapp.comrequest_id=lotofnumber fwd="sentiumbers"dyno=连接=

  • 我正在尝试使用Heroku来部署我的Spring项目,使用来自Github的部署。 我是Spring和赫罗库的新人。 起初它给了我成功的机会,但当我尝试访问时,它会返回以下消息 at=error code=H14 desc=“没有正在运行的web进程”method=GET path=“/”dyno=connect=service=status=503 bytes=protocol=https 我的

  • 我试图从PyCharm部署一个Heroku Dash应用程序。在运行部署它的代码后,我得到了Heroku错误代码“H14-没有Web dynos运行”,其解决方案应该是。这是我试图运行该行时遇到的错误: 其他有这个问题的人被建议检查他们的proc文件。我的文件格式正确,名为“Procfile”其中有,其中“main”是我的应用程序的Python文件名。关于我可能做错了什么,还有其他建议吗?

  • 我为我的cs50最终项目创建了一个烧瓶应用程序。它通过Github成功部署到Heroku,但由于某种原因它不起作用。 在本地运行时,它工作正常。 我的项目文件夹是这样组织的 Procfile的内容如下: 根据这篇有用的帖子,我想这是对的。 按照heroku的指示,我运行了heroku日志--tail--app[app],查看问题出在哪里 这是我得到的错误信息: 当我在Procfile中明确定义它时