From: "Luke A. Kanies" Date: 2003-11-18T01:49:59+09:00 Subject: Re: Long-running daemon acquiring giant memory footprint On Mon, 17 Nov 2003, Jason DiCioccio wrote: > Luke, > After a while of debugging I found a bunch of objects that were being > created that apparently contain one of the primary keys in one of my > database tables. The thing is is the query should only return one result. > This particular row is hardly ever referenced either. So now I have found > a line in my code that is something like you might have been referring to: > > nsEntryId = nsEntryId[0][0] > > That is called quite often, would that cause the object to stay around? > Is this what you were referring to? Yep, that's exactly what I'm referring to. If you undef your local copy of nsEntryId, it still maintains a pointer to itself, so it becomes a closed off lump of storage. I don't know much about ruby's memory management, but it apparently can't catch these problems (I know perl can't). I expect that if you fix that self-reference, your growth will go away. Good luck! -- I went to a restaurant that serves "breakfast at anytime". So I ordered French Toast during the Renaissance. -- Stephen Wright