On Mon, Dec 19, 2011 at 01:16:16PM -0800, David Powell wrote:
>
> Thanks for the prompt reply John.  I added the rescue+logging as you
> suggested to our TouchParticipant.  However, the workitem still just
> "stops" and the log is not triggered so something else is going wrong
> it seems.  The re-apply trick does get it working again, but is
> obviously not ideal.
>
> I'm keen to try and pin down the problem.  Unfortunately, this problem
> only occurs about every 24hrs, so debugging will be a pain.  Do you
> have any suggestions on where to start looking?

Hello David,

I should have asked that earlier, but does it stop always at the same point?
Is there a pattern emerging somehow?

With a 24h frequency we'd better turn some more logging on and wait.
One idea would be to 'instrument' the storage a bit, like in:

---8<---
require 'pp'

class PowellStorage < Ruote::Redis::Storage

  def initialize(redis, options={})
    @log = File.open("ruote_redis_#{$$}.log", 'wb')
    super
  end

  def put_msg(action, options)
    @log.puts('p=' * 40)
    PP.pp([ action, options ], @log)
    super
  end

  def get_msgs
    msgs = super
    @log.puts('=g' * 40)
    msgs.each { |msg| PP.pp(msg, @log); @log.puts('- ' * 40) }
    msgs
  end
end
--->8---

If the messages get in (put_msg) but don't get out (get_msgs) that would
incriminate ruote-redis or redis.

There are other techniques for watching/archiving the engine/workers
activity. The one above is very straightforward, it produces too much info.
This might be better (and more greppable):

---8<---
class PowellStorage < Ruote::Redis::Storage

  def initialize(redis, options={})
    @log = File.open("ruote_redis_#{$$}.log", 'wb')
    super
  end

  def put_msg(action, options)
    @log.puts([ 'in', action, options['fei'].inspect ].join(' '))
    super
  end

  def get_msgs
    msgs = super
    msgs.each { |msg|
      @log.puts([ 'out', msg['action'], msg['fei'].inspect ].join(' '))
    }
    msgs
  end
end
--->8---

Adding the msg['put_at'] could help too.

Does it stop always at the same point? Is there a pattern emerging somehow?


Cheers,

--
John Mettraux - http://lambda.io/processi

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to