Skip to content
This repository has been archived by the owner on Mar 9, 2018. It is now read-only.

Improve Heroku experience #33

Closed
ileitch opened this issue Jan 15, 2012 · 19 comments
Closed

Improve Heroku experience #33

ileitch opened this issue Jan 15, 2012 · 19 comments

Comments

@ileitch
Copy link
Owner

ileitch commented Jan 15, 2012

rapns needs to run seamlessly on Heroku. Where that's not possible; we need clear and simple instructions.

@mihar
Copy link

mihar commented Feb 26, 2012

Isn't it working OK, if you run it as a separate process on the Cedar stack?

@thrillcall
Copy link

Is it safe to run multiple rapns workers on Heroku? Or will they compete with each other for reads and writes to the notification and feedback tables, or try to send multiple copies of the same notification to Apple?

@ileitch
Copy link
Owner Author

ileitch commented Mar 6, 2012

Yes it'll likely send multiple notifications. Are you wanting to send to multiple apps?

Sent from my iPhone

On 06/03/2012, at 9:05 PM, thrillcallreply@reply.github.com wrote:

Is it safe to run multiple rapns workers on Heroku? Or will they compete with each other for reads and writes to the notification and feedback tables, or try to send multiple copies of the same notification to Apple?


Reply to this email directly or view it on GitHub:
#33 (comment)

@thrillcall
Copy link

No, a single app, but we just wanted to verify what the behavior would
be if we ran 'heroku scale rapns=2'. Thanks.

Yes it'll likely send multiple notifications. Are you wanting to send to multiple apps?

@ileitch
Copy link
Owner Author

ileitch commented Mar 7, 2012

ah ok. If you're concerned about throughput, there is a connections config option that controls the number of worker threads. If that isn't enough please open another issue, I've a few ideas for improving throughput.

@EpicDraws
Copy link

I believe this is resolved. Been running on Heroku Cedar for some time without issues, also with 2.0.

@ileitch
Copy link
Owner Author

ileitch commented Jun 19, 2012

Good to hear.

@ileitch ileitch closed this as completed Jun 19, 2012
@neebz
Copy link

neebz commented Jul 5, 2012

@EpicDraws can you give pointers how were you able to run the rapns daemon on Cedar?

Simply running heroku run bundle exec rapns production doesn't work for me.

@ileitch
Copy link
Owner Author

ileitch commented Jul 6, 2012

@neebz trying adding this to your Procfile: rapns: bundle exec rapns $RACK_ENV -f

@vlucas
Copy link

vlucas commented Jul 24, 2012

@EpicDraws Can you describe the web dynos vs worker dynos required to get it working properly? Does it all run okay on the free tier with just a single dyno?

@ileitch
Copy link
Owner Author

ileitch commented Jul 24, 2012

I've just written a quick Heroku guide: https://github.com/ileitch/rapns/wiki/Heroku

@vlucas
Copy link

vlucas commented Jul 24, 2012

I get this error every time, and I'm not quite sure what to do. I get this both on Heroku and locally. Any ideas?

vlucasmbp:myrailsproject vlucas$ bundle exec rails console
Loading development environment (Rails 3.2.3)
1.9.2p0 :001 > app = Rapns::App.new
NameError: uninitialized constant Rapns::App

@ileitch
Copy link
Owner Author

ileitch commented Jul 24, 2012

Have you added rapns to your Gemfile and ran 'bundle install?'

@vlucas
Copy link

vlucas commented Jul 24, 2012

Yes, of course - and Heroku does that each deploy as well.

@ileitch
Copy link
Owner Author

ileitch commented Jul 24, 2012

I was under the impression you may be new to Rails.

That is pretty odd then. Does the Rapns constant exist?

Can you check rapns is even in the load path:

irb(main):006:0> $:.any?{|s|s=~/rapns/}
=> true

What version of bundler do you have?

@ileitch
Copy link
Owner Author

ileitch commented Jul 24, 2012

Oh, and you are using rapns >= 2.0.0 right?

@vlucas
Copy link

vlucas commented Jul 24, 2012

Ah, looks like it was 1.0.7 - I will upgrade and get back to you. The Rapns constant existed, just not the Rapns::App class/module.

@vlucas
Copy link

vlucas commented Jul 24, 2012

Okay, looks like that did it. I upgraded to 2.0.1, ran rails g rapns and rake db:migrate again, and then it worked. Thanks for all the hard work on this awesome gem. Cheers.

@Deddiekoel
Copy link

For Rapns to work properly you need a Worker dyno on Heroku. But the free tier does not support this. Is there any other way to get Rapns to send out notifications? For instance each time a notification is created?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants