157

error H14 happen while deploying to heroku this is my procfile:

web: gunicorn -w 4 -b 0.0.0.0:$PORT -k gevent main:app

log on heroku:

2017-01-23T10:42:58.904480+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/" host=meetcapstone.herokuapp.com request_id=df88efb5-a81a-4ac0-86dc-4e03d71266bb fwd="81.218.117.137" dyno= connect= service= status=503 bytes=
2017-01-23T10:42:59.009135+00:00 heroku[router]: at=error code=H14 desc="No web processes running" method=GET path="/favicon.ico" host=meetcapstone.herokuapp.com request_id=21cea981-36b0-4410-891f-548bbc29f0ee fwd="81.218.117.137" dyno= connect= service= status=503 bytes=

requirements:

Flask==0.11.1
passlib==1.7.0
SQLAlchemy==1.1.5
Werkzeug==0.11.15
gunicorn==19.0.0
gevent==1.2.1
1
  • Please show the whole log from the time you deployed. Were there any errors starting gunicorn? Commented Jan 23, 2017 at 11:07

25 Answers 25

223

The issue here is that you're not running any web dynos. You can tell Heroku to do this via:

$ heroku ps:scale web=1

This will force Heroku to spin up a web dyno, thereby executing your gunicorn command.

14
  • 17
    should i write it in the procfile?
    – Ron Miles
    Commented Jan 24, 2017 at 10:32
  • 3
    amazing! i got this issue to trigger after putting in a malformed procfile and then correcting it
    – Luke
    Commented May 31, 2017 at 10:49
  • 1
    Weird, the dyno in the Heroku dashboard had to be disabled first. Thanks! Commented Mar 15, 2018 at 16:53
  • 72
    Scaling dynos... ! ▸ Couldn't find that process type (web). Commented Feb 24, 2020 at 4:22
  • 2
    (ah ok, was missing a Procfile --very confusing unless you use their example code) Commented Feb 24, 2020 at 4:30
48

After 3 hours of debugging, I've figured out why my app was causing this error:

  1. My Procfile was incorrectly cased
  2. gunicorn wasn't installed in my venv

IMO, this error should be raised on Heroku's end. As a beginner, this sort of error is difficult to trace.

Update: To clarify, Procfile is correctly cased and procfile is not correctly cased. It should start with a capital "P".

More info on dyno configuration – more on initializing your heroku app.

1
  • 2
    To clarify, Procfile is correctly cased and procfile is not correctly cased. It should start with a capital P.
    – NecipAllef
    Commented Oct 19, 2022 at 19:41
20

I ran into the same problem but from a different cause. I had the hobby tier, but then canceled it and reverted back to the free tier. Doing this caused the error and how I fixed it was just re running the command from the cli:

heroku ps:scale web=1
2
  • 6
    Getting an error when running this command ..Scaling dynos... ! Couldn't find that process type (web).
    – Pavindu
    Commented Aug 9, 2022 at 10:18
  • 1
    heroku ps:scale web=1 --app APP_NAME_IN_HEROKU worked for me! Commented Nov 3, 2022 at 0:29
16

Before this command:

heroku ps:scale web=1

I had to remove and add buildpacks again and empty commit it and redeploy it to heroku.

heroku buildpacks:clear
heroku buildpacks:add --index heroku/python
3
  • 1
    I got Error: Expected an integer but received: heroku/python with your last command Commented Jul 3, 2021 at 14:17
  • heroku buildpacks:set heroku/python Commented Jul 31, 2021 at 6:50
  • 1
    ! Couldn't find that process type (web). Commented Aug 20, 2021 at 16:25
11

My issue is that Heroku removed the free plans. To solve such an issue go to Heroku and select/change your free plan to for example "eco" plan.

1
  • This was my issue, as well. For anyone who is looking for an alternative with a free plan, I recommend researching "PaaS hosting providers with a free tier." Commented Dec 21, 2023 at 22:26
7

I was having an issue here too. My problem was that my Procfile was "Procfile.txt" . What solved my issue was to remove the file extension from Procfile, then recommit and push stuff to heroku

7

This isn't the problem with your code, but I've gotten this error message a couple of times now and the mistake that I've made that has caused it has been writing

web:gunicorn

instead of

web: gunicorn

That space can really cause a lot of issues.

0
7

I have a UAT version I only enable during client development.

I have a custom dyno script but it's turned to the free version. So the app was not starting as my script was not running. When I enabled the Dyno the toggle was still off :rolleyes:

enter image description here

1
  • 1
    after few hours of debugging I have found out that this slider was disable in my heroku app Commented Apr 21, 2022 at 18:43
6
  • Login to your Heroku dashboard and open your projects.
  • Go to Settings.
  • Delete heroku/python from the list of buildpacks
  • Then click Add buildpack → Choose "Python" → Save Changes.
  • Activate your environment in your code.
  • Run heroku ps:scale web=1.

And you're done!

1
  • 18
    what do you mean by activate your environment in your code?
    – Ken
    Commented Jan 13, 2021 at 21:30
2

I don't have the reputation to reply to the correct comment, but for me the issue was that I didn't have the run.gunicorn.sh file in my root directory, this resulted in the same "No web processes running" error.

If you don't have this file, create it with contents:

gunicorn -b :5000 --access-logfile - --error-logfile - build:app

Where 'build' is the name of your python file (build.py in this case) and app is the name of your app in the code.

Also make sure that gunicorn is included in requirements.txt, like others have already pointed out.

2

Yeah I was also using web heroku-php-apache2 dyno and reverted it back to free tier and that caused the dyno to sleep fortunately executing heroku ps:scale web=1 -a <app name> did the magic.

2

Try scale down the dyno first.

heroku ps:scale web=0 

Then scale it up.

heroku ps:scale web=1
1

I fixed the issue by going to Configure Dynos and enabling the only dyno I had manually.

1

uff..that took some time,so the fixes i had to make were:

  1. 'Procfile' with upper case P.
  2. web: gunicorn wsgi:app (with a space after web: in procfile)
  3. Making sure the requirements.txt are in the root project folder.
0
1

Sometimes running heroku ps:scale web=1 does not fix the issue, a workaround i found useful is scaling up the dynos then scaling them down to your initial price i.e bumping it to 25$ then scaling it back to 7$

1

In my case, Procfile was in one branch but I was pushing a different branch which didn't have Procfile

0

Change your Procfile file from web:gunicorn to web gunicorn (remove the ':')

1
0

I was missing dynos on the web gui. The cli command to scale did not work. I also may have had an incorrect run:web declaration with missing $PORT. To fix:

heroku.yml must have a web declaration using the $PORT var:

build:
  docker:
    web: Dockerfile
run:
  web: uvicorn main:app --reload --host 0.0.0.0 --port $PORT

I then pushed to heroku.

After that it must have added the web dyno, I could then run:

heroku ps:scale web=1

And now the fastapi uvicorn runs.

0

Pay attention to the Procfile naming and location (https://devcenter.heroku.com/articles/procfile) The Procfile is always a "simple text file" that is named Procfile without a file extension.(Procfile.txt not acceptable!) The Procfile must live in your app's root directory. It does not function if placed anywhere else.

0

Faced the exact same problem turns out I had the Profile in .gitignore

0

I was placing my django Procfile in the directory with settings.py and not the root directory and that gave me the H14 error. I fixed the error with this and I didn't need to do anything else they say.

Procfile

web: gunicorn <django-root-name(containing wsgi)>.wsgi

0

To anyone who may come across this...

  1. delete your Procfile
  2. create 'Procfile' with upper case P.
  3. in your Procfile type: web: gunicorn <nameOfRootFile>:app (with a space after web: in procfile) mine for example was web: gunicorn app:app another way I wrote it that worked was this: web: gunicorn -w 4 "app:create_app()" -t 120
  4. Making sure the requirements.txt are in the root project folder. (you can run pip freeze > requirements.txt if you do not have the file created
  5. deploy to heroku
  6. heroku ps:scale web=1 (you can specify app name to like this heroku ps:scale web=1 -a appname
  7. finally in terminal run heroku restart
  8. heroku open

these are all the steps i took to get mine to work

0
web: gunicorn weather.wsgi --log-file -

this worked for me, just make sure your Procfile is in the right format, and specify the app you are connecting to, in my case it's the weather app. Enjoy

0

I faced the same issue because my application was deployed on the free plan before and its size was more than 300MB. The application worked fine again when I did the following:

  1. Upgrade account to eco plan
  2. Deleted the application
  3. Create new application on heroku for the same project and deployed it.
1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Blue Robin
    Commented Mar 7, 2023 at 21:15
-2

What worked for me was adding on the second line of the procfile:

heroku ps:scale web=1

The first line must contain:

web: gunicorn "filename":"main method name"
1
  • This is very wrong. (a) The file must be called Procfile exactly. procfile is not correct. (b) The Procfile defines process types. It's not a script: you can't put arbitrary commands into it and expect them to run. (c) heroku ps:scale has no business being anywhere near a Procfile. Scaling a dyno formation should be done interactively), as needed. Baking `"one web dyno" into your code so you need to redeploy to scale the formation would be counterproductive if this worked.
    – Chris
    Commented Apr 14 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.