0

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>

Heikki
  • 341
  • 2
  • 18

1 Answers1

1

Move the requirements.txt and the runtime.txt to the location where manage.py and Procfile 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 the main 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 the Procfile would be;

web: gunicorn kauppalista.wsgi --log-file -

OR

web: gunicorn kauppalista.wsgi

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.

eManuel
  • 23
  • 1
  • 7
  • Thanks for input on this one too. After changes first I got: ``remote: -----> Using buildpack: heroku/python remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz``. Then I removed buildpack from heroku web interface (to see if it needed to be reset. ). Then I got: ``remote: ! No default language could be detected for this app. remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.``. – Heikki May 29 '22 at 20:58
  • "I also hope that the kauppalista.wsgi points to the main Django app.": manage.py has this line: `` os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'kauppalista.settings') ``. If I understand correctly that should determine what the Procfile should contain. – Heikki May 29 '22 at 21:01
  • Run `heroku buildpacks:set heroku/python` to set the buildpack to python. The folder structure can be a bit challenging in Heroku. Certain changes in the file arrangement in the project can cause confussion in Heroku's git – eManuel May 29 '22 at 21:06