Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku Error H14 (No web processes running)

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.

like image 543
John Lee Avatar asked Apr 02 '12 02:04

John Lee


People also ask

Why my heroku app is not working?

There are some errors which only occur when the app is rebooting so you will need to restart the app to see these log messages appear. For most apps, we also recommend enabling one of the free logging addons from https://elements.heroku.com/addons#logging to make sure that your historical log data is being saved.

How do I read heroku errors?

Simply use heroku logs to display the last 100 lines of your logs. Heroku only saves the last 1500 lines of logs, which you can access using heroku logs -n 1500 . If you want more logging, check out Heroku add-ons like Logentries or Papertrail.


2 Answers

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

like image 130
Jeff Dickey Avatar answered Oct 06 '22 17:10

Jeff Dickey


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: https://web.archive.org/web/20130926005616/http://www.neilmiddleton.com/the-procfile-is-your-friend)

like image 39
Neil Middleton Avatar answered Oct 06 '22 16:10

Neil Middleton