private_pub
private_pub copied to clipboard
Private pub on heroku with 2 or more dynos
Hi all!
This gem was working like a champion but when i increased to 2 dynos in heroku it just stop working. Seems that request are processed by both dynos, and dynos are on different machines so somehow i get this JS error at the browser: Unexpected response code:400.
What can i do?
Thanks.
Hi Javier,
Have you resolved this issue? I'm considering using Private Pub on Heroku but won't if there's no good solution to this problem.
Hi @bbarton, i haven't found a solution. :s
Hi, I have a problem when I run my private pub collapses Heroku application in my local server works perfectly with any recommendations or installation of the system needs to work?
"Unexpected response code:400." i get the same... but i have two heroku apps - rails app and faye server
Hi Guys
I just moved to Pusher. It's very similar but paid and works everywhere, no need redistogo.
C ya.
Without knowing anything about Private Pub gem and listening to these symptoms, make sure your Faye server is running in its own process. That means it'll sit on its own dyno. Then, no matter how many dynos your Rails app ("web" process) is running, they all just talk to the same Faye dyno. You do that by giving it its own entry in the Procfile and then scaling it to 1 dyno.
faye: bundle exec thin -p 8081 etc. etc.
Sounds like you're running Faye on the Rails dyno, so upping the number of Rails server dynos is causing a new Faye server to boot.
Just my guess from reading the issue.
has anyone found out what was causing this? I'm getting it now on a Faye server running on Heroku (no redis, but it's a pure node.js faye server on a single dyno).