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

fatal: deadlock detected #194

Open
milindphirake opened this issue Jan 22, 2014 · 1 comment
Open

fatal: deadlock detected #194

milindphirake opened this issue Jan 22, 2014 · 1 comment

Comments

@milindphirake
Copy link

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 >

@ileitch
Copy link
Owner

ileitch commented Jan 22, 2014

Thanks for reporting. I suspect this is fixed in 3.4.1 (but that release has some other bugs). I'm close to releasing 4.0, I will try reproduce this.

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

2 participants