这是我以前的问题的延续:
当前我有错误代码= H14 desc =“无网络进程运行”
wihch表明没有dynos。我试图通过执行 heroku ps:scale web = 1
来解决此问题,但会出现错误:缩放dynos ...! ▸找不到该过程类型(Web)。
。此答案建议“通过Heroku dashboard simple Disable/启用”。但是,我看不到任何方法可以做到这一点。其他一些可能的解决方案表明,问题在于procfile,其位置或内容。
这是我的procfile,
web: gunicorn kauppalista.wsgi --log-file -
这是我的文件夹结构:
folder my_project
│ requirements.txt
│ runtime.txt
│ folder .git
│ folder my_project-env
│
└───folder my_project
│ │ folder my_project (main Django app)
│ │ folder django app 1
│ │ folder django app 2
│ │ manage.py
│ │ Procfile
编辑:
我还尝试在hierarcy中移动一个文件夹(与需求.txt相同)。同时,将procfile引用更改为 my_project.my_project.wsgi
。这导致了Dynos的可用性,因此有些不正确,但随后出现了错误: Gunicorn.errors.haltserver:< haltserver“工人未能启动。” 3>
This is continuation of my previous question: What is the propper way to debug gunicorn?
Currently I am having error code=H14 desc="No web processes running"
wihch suggests that there are no dynos. I tried to fix this by doing heroku ps:scale web=1
, but instead got error: Scaling dynos... ! ▸ Couldn't find that process type (web).
. This answer suggests "simple disable/enable through heroku dashboard". However I can't see any way I can do that. Some other possible solutions suggested that the problem is with the Procfile, its location or its content.
Here is my Procfile
web: gunicorn kauppalista.wsgi --log-file -
Here is my folder structure:
folder my_project
│ requirements.txt
│ runtime.txt
│ folder .git
│ folder my_project-env
│
└───folder my_project
│ │ folder my_project (main Django app)
│ │ folder django app 1
│ │ folder django app 2
│ │ manage.py
│ │ Procfile
EDIT:
I also tried moving Procfile one folder up in hierarcy (to same as requirements.txt). At the same time changed Procfile reference to my_project.my_project.wsgi
. This resulted in dynos to be available so something went right, but then got error: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
发布评论
评论(1)
将
unignts.txt
和runtime.txt
移动到manage.py.py
和procfile
的位置您的文件夹结构是因为,它们都必须处于项目根部。我也希望
kauppalista.wsgi
指向MAIN DJANGO APP
。例如,从您提供的文件夹结构中,将在此位置内找到
wsgi.py
文件:文件夹my_project&gt;文件夹my_project&gt;文件夹my_project(称为kauppalista的主Django应用)
。因此,procfile
将是;或
运行
HEROKU PS
命令还应帮助您确定更改后确定Dynos的状态。在情况下,它说'app'no dyno'
,只需通过loggin通过您的Web浏览器通过loggin禁用/启用dynos。记住要添加,提交并将您的更改推向Heroku。
Move the
requirements.txt
and theruntime.txt
to the location wheremanage.py
andProcfile
is found in your folder structure because, they are all required to be in the project root....See here
I also hope that the
kauppalista.wsgi
points to themain Django app
.For instance, from the folder structure you provided, the
wsgi.py
file would be found inside this location:folder my_project > folder my_project > folder my_project(main Django app called kauppalista)
. So theProcfile
would be;OR
Running the
heroku ps
command should also help you to determine the state of the dynos after you apply the changes. In the case it says'no dyno on app'
, simply disable/enable dynos through the heroku dashboard by loggin in via your web browser.Remember to add, commit and push your changes to heroku.