Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
a13g does not recover from connection errors
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
momo  
View profile  
 More options Oct 6 2010, 12:11 pm
From: momo <sunbea...@googlemail.com>
Date: Wed, 6 Oct 2010 09:11:26 -0700 (PDT)
Local: Wed, Oct 6 2010 12:11 pm
Subject: a13g does not recover from connection errors
Hi all,

first of all thanks a lot to everybody involved for creating this
great framework!

The problem I have though is that neither sender nor receiver really
recover from connectivity errors. I have been googling and also
searching this forum but it seems I am the first one to have these
problems.

1. Receiver (running on FreeBSD 8.0)

After a few million messages being received via ActiveMQ, the receiver
loses the connection with this exception:

ActiveMessaging?: thread[default]: Exception from connection.receive:
Packet parsing timeout
/usr/local/lib/ruby/gems/1.8/gems/stomp-1.1.6/lib/stomp/connection.rb:
352:in `_receive'

    /usr/local/lib/ruby/gems/1.8/gems/stomp-1.1.6/lib/stomp/
connection.rb:347:in `synchronize'
    /usr/local/lib/ruby/gems/1.8/gems/stomp-1.1.6/lib/stomp/
connection.rb:347:in `_receive'
    /usr/local/lib/ruby/gems/1.8/gems/stomp-1.1.6/lib/stomp/
connection.rb:325:in `old_receive'
    /usr/local/lib/ruby/gems/1.8/gems/stomp-1.1.6/lib/stomp/
connection.rb:335:in `receive'
    /usr/local/lib/ruby/gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging/adapters/stomp.rb:61:in `receive'
    /usr/local/lib/ruby/gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging/gateway.rb:36:in `start'
    /usr/local/lib/ruby/gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging/gateway.rb:32:in `start'
    /usr/local/lib/ruby/gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging/gateway.rb:31:in `each'
    /usr/local/lib/ruby/gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging/gateway.rb:31:in `start'
    /usr/local/lib/ruby/gems/1.8/gems/activemessaging-0.7.1/lib/
activemessaging.rb:111:in `start'
    /usr/home/hte/Oystercatcher/CoreEngine/lib/poller.rb:27
    /usr/local/lib/ruby/gems/1.8/gems/daemons-1.1.0/lib/daemons/
application.rb:203:in `load'
    /usr/local/lib/ruby/gems/1.8/gems/daemons-1.1.0/lib/daemons/
application.rb:203:in `start_load'
    /usr/local/lib/ruby/gems/1.8/gems/daemons-1.1.0/lib/daemons/
application.rb:292:in `start'
    /usr/local/lib/ruby/gems/1.8/gems/daemons-1.1.0/lib/daemons/
controller.rb:73:in `run'
    /usr/local/lib/ruby/gems/1.8/gems/daemons-1.1.0/lib/daemons.rb:143
    /usr/local/lib/ruby/gems/1.8/gems/daemons-1.1.0/lib/daemons/
cmdline.rb:112:in `call'
    /usr/local/lib/ruby/gems/1.8/gems/daemons-1.1.0/lib/daemons/
cmdline.rb:112:in `catch_exceptions'
    /usr/local/lib/ruby/gems/1.8/gems/daemons-1.1.0/lib/daemons.rb:
142:in `run'
    script/poller:23

Having this in processors/application.rb ...

  def on_error(err)
    logger.error "ApplicationProcessor::on_error: #{err.class.name}
rescued:\n" + \
      err.message + "\n" + \
      "\t" + err.backtrace.join("\n\t")
    raise ActiveMessaging::AbortMessageException.new, err.message
  end

 .... and broker.yml set to reliable ...

    adapter: stomp

    # properties below are all defaults for this adapter
    login: ""
    passcode: ""
    host: 192.168.178.8
    port: 61612
    reliable: true
    reconnectDelay: 5

... I would expect that a13g recovers from this error and reconnects/
retries, no?
Obviously this does not happen and message processing simply ceases.

2. Sender (WinXP in a VirtualBox)

When sending messages, VBox seems to have a problem regarding keeping
the TCP connection alive and at some point loses it. This surely is no
a13g problem, but again, I would expect a13g to recover from this
error and retry:

I send with ...

    publish :queue, message, {}, 600

... and get an ECONNRESET exception from which a13g never recovers
(unfortunately I have no trace here at the moment but I can try to
reproduce if necessary) so I tried this workaround which seems to
improve the situation but I am not sure if this is the right was to do
it:

  begin
    client = ActiveMessaging::Gateway.connection
    client.send queue, message, {}
  rescue Exception
    Rails.logger.error "Caught exception: #{$!}, retrying..."
    retry
  end

Does anybody have any idea what I am doing wrong here?

Thanks a lot!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »