8

SOLVED: was due to network limitation

I just pushed my app and i need to run my migration files to initialize the database

i get the following error: what should i do ?

EDIT: heroku run bash -app appname yields the same error

Running rake db:migrate attached to terminal... /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/client/rendezvous.rb:33:in `initialize': Operation timed out - connect(2) (Errno::ETIMEDOUT)
    from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/client/rendezvous.rb:33:in `open'
    from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/client/rendezvous.rb:33:in `block in start'
    from /Users/stan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
    from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/client/rendezvous.rb:27:in `start'
    from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/command/run.rb:36:in `index'
    from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/lib/heroku/command.rb:114:in `run'
    from /Users/stan/.rvm/gems/ruby-1.9.2-p290/gems/heroku-2.14.0/bin/heroku:14:in `<top (required)>'
    from /Users/stan/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `load'
    from /Users/stan/.rvm/gems/ruby-1.9.2-p290/bin/heroku:19:in `<main>'

This is the result of running heroku ps to check my running processes:

Process State Command 
-------------------------------------------------------- 
run.1 complete for 24m bundle exec rake db:migrate 
run.2 complete for 22m bundle exec rake db:migrate 
run.3 complete for 16m bash 
run.4 complete for 5m bundle exec rake db:migrate 
run.5 complete for 1m bundle exec rake db:migrate 
web.1 up for 6m bundle exec rails server -p $PORT 
stanm87
  • 600
  • 4
  • 16
  • 1
    Are you sure the rake client is not still running? You can check via `heroku ps --app app_name_goes_here` .. Sometimes the console will timeout and the rake client will keep running. – iwasrobbed Dec 08 '11 at 04:25
  • @iWasRobbed this the result of the command you gave me: i'm not sure what it means. Process State Command ------- ---------------- --------------------------------- run.1 complete for 24m bundle exec rake db:migrate run.2 complete for 22m bundle exec rake db:migrate run.3 complete for 16m bash run.4 complete for 5m bundle exec rake db:migrate run.5 complete for 1m bundle exec rake db:migrate web.1 up for 6m bundle exec rails server -p $PORT – stanm87 Dec 08 '11 at 04:30
  • That basically shows what processes are running on the server. So you have two `rake db:migrate` processes that have been complete for at least 20 mins. You should verify that the database migrated successfully by checking that your changes made it into the current schema. (i.e. if you added a field in the migration, make sure you can access the field in the Heroku console now) – iwasrobbed Dec 08 '11 at 05:00
  • blah i get the same error when i run heroku run console. I'm starting to think it's something to do with my connection but it's strange. – stanm87 Dec 08 '11 at 08:17
  • ok this was indeed due to my network connection. for some reason it refuses "heroku run..." style commands. it worked on another network. thank you for trying to help – stanm87 Dec 08 '11 at 09:04
  • No worries, timeouts happen on Heroku a lot. – iwasrobbed Dec 08 '11 at 15:12
  • what do you mean by it worked on another network ? – CanCeylan Nov 07 '12 at 01:50

1 Answers1

5

Heroku has had issues with migrations on some of my apps. They have told me to do this:

heroku run bash --app appname
rake db:migrate
andrewpthorp
  • 4,998
  • 8
  • 35
  • 56