I implemented the push notifications and GCM notifications using this gem working great.
@ileitch
But i came across one strange issue. Sometimes my rails server goes into deadlock state.
Any Help on this will be great
I got the following log.
It cames when there is noting to push and we call "Rapns.push"
Log= >
Rapns::Notification Load (0.6ms) SELECT rapns_notifications.* FROM rapns_notifications WHERE (delivered = 0 AND failed = 0 AND (deliver_after IS NULL OR deliver_after < '2014-01-22 17:30:48')) AND (app_id IN (1,2,3,4))
=> {}
1.9.3-p484 :005 > Rapns.push
(0.3ms) SELECT COUNT(_) FROM rapns_apps
Rapns::App Load (0.2ms) SELECT rapns_apps._ FROM rapns_apps
Rapns::Notification Load (0.6ms) SELECT rapns_notifications.* FROM rapns_notifications WHERE (delivered = 0 AND failed = 0 AND (deliver_after IS NULL OR deliver_after < '2014-01-22 17:30:55')) AND (app_id IN (1,2,3,4))
fatal: deadlock detected
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/delivery_handler.rb:21:in join' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/delivery_handler.rb:21:instop'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/app_runner.rb:81:in map' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/app_runner.rb:81:instop'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/app_runner.rb:46:in map' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/app_runner.rb:46:instop'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/push.rb:15:in push' from (irb):5 from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.6/lib/rails/commands/console.rb:47:instart'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.6/lib/rails/commands/console.rb:8:in start' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.6/lib/rails/commands.rb:41:in<top (required)>'
from script/rails:6:in require' from script/rails:6:in'
1.9.3-p484 :006 >
I implemented the push notifications and GCM notifications using this gem working great.
@ileitch
But i came across one strange issue. Sometimes my rails server goes into deadlock state.
Any Help on this will be great
I got the following log.
It cames when there is noting to push and we call "Rapns.push"
Log= >
Rapns::Notification Load (0.6ms) SELECT
rapns_notifications
.* FROMrapns_notifications
WHERE (delivered = 0 AND failed = 0 AND (deliver_after IS NULL OR deliver_after < '2014-01-22 17:30:48')) AND (app_id IN (1,2,3,4)) => {}1.9.3-p484 :005 > Rapns.push
(0.3ms) SELECT COUNT(_) FROM'
1.9.3-p484 :006 >
rapns_apps
Rapns::App Load (0.2ms) SELECTrapns_apps
._ FROMrapns_apps
Rapns::Notification Load (0.6ms) SELECTrapns_notifications
.* FROMrapns_notifications
WHERE (delivered = 0 AND failed = 0 AND (deliver_after IS NULL OR deliver_after < '2014-01-22 17:30:55')) AND (app_id IN (1,2,3,4)) fatal: deadlock detected from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/delivery_handler.rb:21:injoin' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/delivery_handler.rb:21:in
stop' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/app_runner.rb:81:inmap' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/app_runner.rb:81:in
stop' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/app_runner.rb:46:inmap' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/daemon/app_runner.rb:46:in
stop' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/rapns-3.3.2/lib/rapns/push.rb:15:inpush' from (irb):5 from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.6/lib/rails/commands/console.rb:47:in
start' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.6/lib/rails/commands/console.rb:8:instart' from /home/ubuntu/.rvm/gems/ruby-1.9.3-p484/gems/railties-3.2.6/lib/rails/commands.rb:41:in
<top (required)>' from script/rails:6:inrequire' from script/rails:6:in