【问题标题】:Heroku foreman start command stuck in virtualenv while attempting to run Django projectHeroku foreman start 命令在尝试运行 Django 项目时卡在 virtualenv 中
【发布时间】:2014-12-23 19:35:00
【问题描述】:

我正在尝试实现 Django Heroku 教程https://devcenter.heroku.com/articles/getting-started-with-django

python manage.py runserver 在 vi​​rtualenv 内外都可以正常工作

foreman start 在 vi​​rtualenv 之外工作正常

foreman start 在 vi​​rtualenv 中,命令要么停留在第一行,要么以代码 1 结束

13:29:08 web.1  | started with pid 4231
13:29:13 web.1  | exited with code 1
13:29:13 system | sending SIGTERM to all processes 

更新:

过程文件

web: gunicorn cell_modelling_site.wsgi

【问题讨论】:

  • foreman run run python manage.py runserver 在你的 venv 中工作吗?如果是,您可以使用它。
  • 它有效,但它真的等同于foreman start吗?当我 heroku openheroku logs 除了我有第 500 个 http 请求错误之外没有显示任何内容时,我有内部服务器错误。我需要一些工具来为我提供有关原因的更多信息。
  • 您能提供您的Procfile 中的内容吗?
  • 当然。 web: gunicorn cell_modelling_site.wsgi

标签: python django heroku upload foreman


【解决方案1】:

我遇到了更棘手的问题。我通过使用 pip 安装 gunicorn==0.16.1 解决了这个问题。希望这也能解决您的问题....

用 gunicorn==0.16.1 替换现有的 gunicorn

【讨论】:

  • 我想是的。当我们安装 django-toolbelt 时,它会安装 gunicorn。我认为这是因为 gunicorn 版本。但是 python manage.py runserver 工作正常。
猜你喜欢
  • 2020-12-21
  • 2021-01-08
  • 2020-12-18
  • 2020-12-30
  • 2020-05-05
  • 2017-08-10
  • 1970-01-01
相关资源
最近更新 更多