ashish173 / xmpp4r-simple

Automatically exported from code.google.com/p/xmpp4r-simple
GNU General Public License v2.0
0 stars 0 forks source link

100% cpu load until subscription will be accepted #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I have the same problem with both Backgroundrb and Jabber::Bot

class AlertWorker < BackgrounDRb::MetaWorker
  set_worker_name :alert_worker
  def create(args = nil)
    require 'xmpp4r-simple'
    config = YAML.load_file("#{RAILS_ROOT}/config/jabber.yml")
    @jabber = Jabber::Simple.new config['jabber_id'], config['password']
  end
  def send_message(args = nil)
    recipient, message = args
    @jabber.deliver recipient, message
  end
end

What is the expected output? What do you see instead?
100% cpu load until subscription will be accepted

What version of the product are you using? On what operating system?
Ubuntu 7.10, gem version 0.8.7

Original issue reported on code.google.com by bence.n...@gmail.com on 19 Feb 2008 at 4:48

GoogleCodeExporter commented 9 years ago
Hi, 

I confirm this bug

Original comment by fre...@gmail.com on 1 Mar 2008 at 2:05

GoogleCodeExporter commented 9 years ago
+1 on OS X 10.5.4

Original comment by 52ebcbd8...@gmail.com on 7 Jul 2008 at 10:46

GoogleCodeExporter commented 9 years ago
+1 under hardy heron running under passenger in a rails app.  I didn't see the 
issue
under mongrel but this ticket makes it seem that it happens regardless of the 
server
software.

Cross-reported to the passenger tracker:
http://code.google.com/p/phusion-passenger/issues/detail?id=93

Original comment by knew...@gmail.com on 16 Jul 2008 at 7:28

GoogleCodeExporter commented 9 years ago
I'm experiencing this as well.

Have we not heard anything about this at all since? It's been over 1 year.

Original comment by chiol...@gmail.com on 22 Apr 2009 at 5:31

GoogleCodeExporter commented 9 years ago
I've added a ticket on GitHub:

http://github.com/blaine/xmpp4r-simple/issues/#issue/1

The problem is with the start_deferred_delivery_thread method that starts a 
thread in the background and 
then loops with no delay between each loop.

I fixed this by putting in a sleep call at the end of the loop. I chose 10 
minutes between checks. I plan to 
update this and make it configurable later.

Original comment by chiol...@gmail.com on 23 Apr 2009 at 5:57