Intermittent RingNotFound error

Am running a rails application which launches a series of relatively long running scripts using delayed_job and Rinda to farm out the work. At the moment am using a single delayed_job process (rake jobs:work, as am stuck on Windows), a ring server process (started with RingyDingy), and a single service process ( pretty ordinary )

These are running in the same machine (though we have plans to actually have a ‘farm’ of services on more than one machine).

When we start a run of more than a few scripts ( longest run is about 48 scripts, run time up to 7 hours total) we occasionally see a script fail because it can’t find the ring server (RingNotFound) error even though the ring server process is running fine. The next script almost always finds the server and runs ok.

Anyone have any ideas?

Code follows

worker excerpt: (where the error occurs)

Update: I needed to put a longer timeout in the call to Rinda::RingFinger#lookup_ring_any. After using 30 seconds instead of the default 5 seconds, the error went away. pat