GithubHelp home page GithubHelp logo

Improve Heroku experience about rapns HOT 19 CLOSED

ileitch avatar ileitch commented on August 14, 2024
Improve Heroku experience

from rapns.

Comments (19)

mihar avatar mihar commented on August 14, 2024

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

from rapns.

thrillcall avatar thrillcall commented on August 14, 2024

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?

from rapns.

ileitch avatar ileitch commented on August 14, 2024

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, [email protected] 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)

from rapns.

thrillcall avatar thrillcall commented on August 14, 2024

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?

from rapns.

ileitch avatar ileitch commented on August 14, 2024

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.

from rapns.

EpicDraws avatar EpicDraws commented on August 14, 2024

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

from rapns.

ileitch avatar ileitch commented on August 14, 2024

Good to hear.

from rapns.

neebz avatar neebz commented on August 14, 2024

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

from rapns.

ileitch avatar ileitch commented on August 14, 2024

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

from rapns.

vlucas avatar vlucas commented on August 14, 2024

@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?

from rapns.

ileitch avatar ileitch commented on August 14, 2024

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

from rapns.

vlucas avatar vlucas commented on August 14, 2024

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

from rapns.

ileitch avatar ileitch commented on August 14, 2024

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

from rapns.

vlucas avatar vlucas commented on August 14, 2024

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

from rapns.

ileitch avatar ileitch commented on August 14, 2024

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?

from rapns.

ileitch avatar ileitch commented on August 14, 2024

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

from rapns.

vlucas avatar vlucas commented on August 14, 2024

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.

from rapns.

vlucas avatar vlucas commented on August 14, 2024

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.

from rapns.

Deddiekoel avatar Deddiekoel commented on August 14, 2024

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?

from rapns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.