【问题标题】:Couldn't find that process type (web)找不到该进程类型(网络)
【发布时间】:2020-04-08 07:54:00
【问题描述】:

所以我正在做一个大学小组项目,我们明天要演示。这是一个烧瓶 API,我使用 Heroku 托管。一开始我遇到了这个错误

code=H14 desc="No web processes running" 环顾四周后,我找到了一种使用以下方法缩放测功机的解决方案:

heroku ps:scale web=1

又失败了,导致了这个错误

Couldn't find that process type (web)

我不知道出了什么问题。我的 Procfile 被正确命名并更新(最后没有 .txt)。任何帮助将不胜感激。

我的档案:

web:gunicorn api_prediction:medi-ai

其中“api-prediction”是要运行的 python 文件,“medi-ai 是项目名称”

【问题讨论】:

    标签: heroku heroku-cli


    【解决方案1】:

    Procfile 示例

    #filename: Procfile
    web: gunicorn runserver:app --log-file=-
    

    独角兽的例子

    # filename: run.gunicorn.sh
    gunicorn -b :5000 --access-logfile - --error-logfile - runserver:app
    

    同时安装 gunicorn,不要错过 requirements.txt 文件。

    pip install gunicorn
    
    pip freeze > requirements.txt
    

    如果这不能解决您的问题,请回复。

    【讨论】:

      猜你喜欢
      • 2019-10-23
      • 1970-01-01
      • 2018-07-08
      • 2017-10-16
      • 2021-04-03
      • 2022-08-06
      • 2021-06-01
      • 2021-03-15
      • 1970-01-01
      相关资源
      最近更新 更多