From: Eric Hodel Date: 2005-11-05T09:20:55+09:00 Subject: Re: DRb recycled objects. On Nov 3, 2005, at 7:16 PM, Kevin Brown wrote: > Eric, I really REALLY am not trying to point a finger here at ALL, > but I guess my question is why did Ruby garbage collect the object > consistantly (I mean at least 30 executions in the exact same > place)? Where as now that I've axed all the .id calls it > consistantly (at least 100 executions) works now. The garbage collector is not random in how it collects garbage. Which objects are considered garbage can be affected by which methods are called. > Richard and everyone else may also like that I was getting Korundum > warnings about Object#id being depracated and to use > Object#object_id. These only showed up when I started using DRb. > This was what made me change the names in the first place, because > it was obvious to me that MY code wasn't getting called. I don't > know the Korundum bindings too well, but I'm guessing the Korundum > method_missing fired instead of the call being passed across the > wire. Perhaps this was a nasty interaction between the two? > Korundum object id used instead of a DRb object id which later > tried to get passed down the wire? Maybe? There is a lot of two > way communication between the server and client. Possibly. > Either way, I'm _relatively_ sure that it works now...? > > And this is exactly why I posted, because I still don't get it. > > I do know how to change the garbage collection method for DRb, but > I simply haven't had the need at all, since it consistantly works > now (I'll continue to monitor). You can either rewrite your application to ensure it holds onto all remote references or you can use one of the alternate id conversion classes: http://segment7.net/projects/ruby/drb/idconv.html -- Eric Hodel - drbrain@segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04