I have an application written in Rails, deployed on Heroku. I used to have been working on 1 web dyno, but today I have published the app, the traffic is quite big so I decided to increase to 4 web dynos and 1 worker dynos. I don't know why always when I do heroku ps
it shows:
Process State Command
-------- -------------- ---------------------------------
web.1 up for 22s bundle exec rails server -p $PORT
web.2 up for 36s bundle exec rails server -p $PORT
web.3 up for 25s bundle exec rails server -p $PORT
web.4 up for 22s bundle exec rails server -p $PORT
worker.1 crashed for 7s bundle exec rake jobs:work
Worker dyno crashes directly after heroku scale worker=1
. Logs are like:
2012-03-11T23:12:18+00:00 heroku[worker.1]: Starting process with command `bundle exec rake jobs:work`
2012-03-11T23:12:19+00:00 heroku[worker.1]: State changed from starting to up
2012-03-11T23:12:22+00:00 app[worker.1]: rake aborted!
2012-03-11T23:12:22+00:00 app[worker.1]: Don't know how to build task 'jobs:work'
2012-03-11T23:12:22+00:00 app[worker.1]:
2012-03-11T23:12:22+00:00 app[worker.1]: (See full trace by running task with --trace)
2012-03-11T23:12:23+00:00 heroku[worker.1]: Process exited with status 1
2012-03-11T23:12:23+00:00 heroku[worker.1]: State changed from up to crashed
2012-03-11T23:12:23+00:00 heroku[worker.1]: State changed from crashed to created
2012-03-11T23:12:23+00:00 heroku[worker.1]: State changed from created to starting
2012-03-11T23:12:32+00:00 heroku[worker.1]: Starting process with command `bundle exec rake jobs:work`
2012-03-11T23:12:32+00:00 heroku[worker.1]: State changed from starting to up
2012-03-11T23:12:36+00:00 app[worker.1]: rake aborted!
2012-03-11T23:12:36+00:00 app[worker.1]: Don't know how to build task 'jobs:work'
2012-03-11T23:12:36+00:00 app[worker.1]:
2012-03-11T23:12:36+00:00 app[worker.1]: (See full trace by running task with --trace)
2012-03-11T23:12:37+00:00 heroku[worker.1]: Process exited with status 1
2012-03-11T23:12:37+00:00 heroku[worker.1]: State changed from up to crashed
That's it. Do you have any idea why? Web dynos are working properly. Do I have to configure something in my app to use worker dynos?
I would be also grateful if you can explain me in human words what is the logic behind dividing the heroku platform into web and worker dynos? I have read documentation number of times but I still think I missing the point to understand it as I grew up in the world where you had your storage limit and stuff.