private_pub icon indicating copy to clipboard operation
private_pub copied to clipboard

Private pub on heroku with 2 or more dynos

Open Javierchik opened this issue 12 years ago • 7 comments

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.

Javierchik avatar Apr 12 '12 22:04 Javierchik

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.

bbarton avatar May 09 '12 19:05 bbarton

Hi @bbarton, i haven't found a solution. :s

Javierchik avatar May 16 '12 14:05 Javierchik

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?

alfredo777 avatar May 16 '12 16:05 alfredo777

"Unexpected response code:400." i get the same... but i have two heroku apps - rails app and faye server

d0minikk avatar May 19 '12 23:05 d0minikk

Hi Guys

I just moved to Pusher. It's very similar but paid and works everywhere, no need redistogo.

C ya.

Javierchik avatar Jun 04 '12 15:06 Javierchik

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.

danneu avatar Nov 10 '12 02:11 danneu

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).

bastiaanterhorst avatar Feb 19 '13 21:02 bastiaanterhorst