On 2007-09-03, at 3:52 PM, Matthew Langham wrote:

> I need to add that we are running the integrated aaf Ferret Drb  
> Server,
> so I guess it is the Drb Server that is losing the connection? How  
> can I
> get it to reconnect without throwing the error?

Hey ..

we've got the same error with our non-aaf backgroundrb solution ..

that's what we're doing:

begin
   index_object( record )
rescue ActiveRecord::RecordNotFound
   @logger.warn "Object gone"
rescue ActiveRecord::StatementInvalid
   @logger.warn "MySQL is gone.."
   clazz.connection.reconnect!
   enqueue_object( record )
end

So basically just catch the StatementInvalid Exception and
try again after you reconnected to the database..

I guess Jens can add something like that to AAF quite easily :)

Ben

_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to