Heroku Error H14 (No web processes running)

19,396

Solution 1

The name of your web process must be web, and this is the process that Heroku will always scale to '1' on initial deploy.

Other services in the Procfile can be called what you want, but you need to scale them initially (so you can have dev only processes in there if you want).

More information here: http://neilmiddleton.com/the-procfile-is-your-friend/ (the cached version: http://www.neilmiddleton.com/the-procfile-is-your-friend)

Solution 2

I had the same problem, but for me it was because I needed to run heroku ps:scale web=1

Share:
19,396
John Lee
Author by

John Lee

Troublemaker

Updated on June 07, 2022

Comments

  • John Lee
    John Lee 12 months

    Pretty sure some people encountered this problem before.

    Followed all the instructions to setup node and npm. When pushing to heroku there were no errors. But when I open the app, it shows "Application Error"

    heroku ps
    

    returns

    Process  State      Command       
    -------  ---------  ------------  
    main.1   up for 1m  node main.js
    

    while

    heroku logs
    

    returns

    Error H14 (No web processes running) -> GET mewtwo.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=
    

    I tried restarting the app with heroku restart but still get the same error. Google around and there were no other solution other than heroku restart. Anyone tried other methods ?


    Answer: (I put it here since my rep is too low to post answer yet)

    Ok finally figured it out myself.

    Apparently in the Procfile, I declared

    main: node main.js
    

    but Heroku uses

    web: node main.js
    

    I thought the naming can be anything you want but it is actually strict, you need to use web for it to work (heroku did not emphasize this - be wary) at least for now, until I figure out why this strictness and if I can change the name.

  • Ismael
    Ismael about 11 years
    I would add that if he really want's to have a named process as "main", that has nothing to do with web (for work process, there should be no http routing), he could do it by scaling web=0 main=1, and then restart
  • Neil Middleton
    Neil Middleton about 11 years
    No need to restart on scaling.
  • kynan
    kynan over 9 years
    This is needed if you initially forget to push a Procfile. In that case, even pushing one later or running heroku ps:restart will not help.
  • emilebaizel
    emilebaizel over 9 years
    i wasn't seeing anything after adding a Procfile. but then setting the ps:scale web=1 got things up and running right away. thanks!
  • Hertzel Guinness
    Hertzel Guinness almost 9 years
    Happened to me after duplicating an app using heroku fork
  • Jim
    Jim over 8 years
    Happened to me after pushing code with a procfile named with the wrong case.
  • daleyjem
    daleyjem over 6 years
    Whatever I did initially, this worked for me... Thanks, Jeff