ryanb / private_pub

Handle pub/sub messaging through private channels in Rails using Faye.
MIT License
864 stars 228 forks source link

Deploying on Heroku #125

Closed Sashkan closed 8 years ago

Sashkan commented 8 years ago

Hi! I managed to run everything smoothly in dev environment, but once in prod, things get tricky.

Using the exact same configuration, I modified a few files to match staging environment:

private_pub.yml :

development:
  server: "http://localhost:9292/faye"
  secret_token: "secret"
staging:
  server: "http://krawd-development.herokuapp.com/faye"
  secret_token: "krawdy"

Procfile:

web: bundle exec puma -C config/puma.rb
web: bundle exec rackup private_pub.ru -s thin -p $PORT -E production

But my app doesn't even start, here are the logs :

2016-03-15T10:41:07.972042+00:00 heroku[web.1]: Starting process with command `bundle exec rackup private_pub.ru -s thin -p 10993 -E production`
2016-03-15T10:41:08.383813+00:00 heroku[worker.1]: Process exited with status 1
2016-03-15T10:41:08.391521+00:00 heroku[worker.1]: State changed from up to crashed
2016-03-15T10:40:58+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.09 sample#load-avg-5m=0.095 sample#load-avg-15m=0.11 sample#read-iops=0 sample#write-iops=0.080645 sample#memory-total=15666160.0kB sample#memory-free=14014336.0kB sample#memory-cached=504756kB sample#memory-redis=421904bytes sample#hit-rate=1 sample#evicted-keys=0
2016-03-15T10:41:33.881148+00:00 heroku[run.1782]: Client connection is idle for 3600 seconds; closing
2016-03-15T10:41:33.881795+00:00 heroku[run.1782]: Client connection closed. Sending SIGHUP to all processes
2016-03-15T10:41:34.622755+00:00 heroku[run.1782]: Process exited with status 129
2016-03-15T10:41:34.635346+00:00 heroku[run.1782]: State changed from up to complete
2016-03-15T10:42:08.554127+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2016-03-15T10:42:08.554127+00:00 heroku[web.1]: Stopping process with SIGKILL
2016-03-15T10:42:09.240382+00:00 heroku[web.1]: Process exited with status 137
2016-03-15T10:42:09.260117+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-15T10:42:09.261226+00:00 heroku[web.1]: State changed from crashed to starting
2016-03-15T10:41:54+00:00 app[heroku-redis]: source=REDIS sample#active-connections=1 sample#load-avg-1m=0.085 sample#load-avg-5m=0.095 sample#load-avg-15m=0.11 sample#read-iops=0 sample#write-iops=0.040509 sample#memory-total=15666160.0kB sample#memory-free=14013916.0kB sample#memory-cached=504772kB sample#memory-redis=421904bytes sample#hit-rate=1 sample#evicted-keys=0
2016-03-15T10:42:15.991146+00:00 heroku[web.1]: Starting process with command `bundle exec rackup private_pub.ru -s thin -p 4109 -E production`
2016-03-15T10:42:48.822615+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=krawd-development.herokuapp.com request_id=96b76ce5-4a97-4c33-a2c8-fc2fbf807449 fwd="81.64.135.232" dyno= connect= service= status=503 bytes=

Is it related to redis ? Or am I missing something in config ?