【问题标题】:Set gunicorn TIMEOUT in heroku.yml在 heroku.yml 中设置 gunicorn TIMEOUT
【发布时间】:2019-09-28 03:34:35
【问题描述】:

我正在尝试在 heroku.yml 中为生产环境设置 gunicorn TIMEOUT。

在本地环境中,我设法在 docker-compose.yml 中使用此命令更改了 gunicorn 超时

version: '3.7' services:   web:
    build: .
    command: python /code/manage.py runserver 0.0.0.0:8000
    command: gunicorn bookstore_project.wsgi -b 0.0.0.0:8000 
    command: gunicorn bookstore_project.wsgi:application -w 2 -b :8000 --timeout 1000 #change TIMEOUT

但是,我不知道如何为生产环境更改 heroku.yml 中的 TIMEOUT。

请帮忙。

谢谢!

【问题讨论】:

    标签: docker heroku gunicorn


    【解决方案1】:

    适合我这种情况的人。 Heroku 支持刚刚回复我,允许的最大超时是 120 秒,如果我需要更多时间来执行任务,我应该使用后台任务。 关键字是django后台任务,有很多选项可供选择。 希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 2011-12-05
      • 1970-01-01
      • 2018-04-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-05
      • 1970-01-01
      • 2021-03-07
      相关资源
      最近更新 更多