[Mongrel] Mongrel using way more memory on production than staging

Chris Taggart lists at ruby-forum.com
Wed Oct 3 16:59:23 EDT 2007

Kirk Haines wrote:
> On 10/3/07, Zed A. Shaw <zedshaw at zedshaw.com> wrote:
>> Apart from that, I've got no idea.  Last time I dealt with this crap with the
>> horrible Ruby GC implementation the entire Ruby world took out
>> torches and chased me down the street screaming that I was ruining
>> their party be exposing how crap the code is.
> Hey now.  I was one of those torch carriers, but all I was worried
> about was making sure we were pointing in the right direction in
> identifying the real memory leak instead of just villifying poor,
> innocent Mutex.  In the end, it was the influence of that dastardly
> Array#shift that had turned Mutex into the problem causing bad boy.
> What's really appalling is how long it took after that time before
> Array#shift was actually fixed in a ruby release.  It should have been
> fixed in 1.8.5.
> I suspect that the leak in the gethostbyname code is a similar sort of
> sloppiness that had been overlooked (and probably still exists in
> 1.9).
> Chris, you asked about suggestions on how track down memory leaks.
> What Zed said.  In addition, you can manually write code to check
> ObjectSpace object counts.  If you suspect that the problem is
> actually at Ruby or C/C++ extension level, you can also use a tool
> like valgrind to analyze running code and see if you can pinpoint
> anything that is actualy a problem.
> Kirk Haines

Thanks for all the suggestions. Will try them out, and perhaps try some 
direct comparisons of 1.8.5 and 1.8.6 to see how the Array#shift pro is 
affecting things.

Anybody got any thoughts re the idea of running the app servers under 
32-bit kernel? May seem naive, but would seem to improve the memory 
Posted via http://www.ruby-forum.com/.

More information about the Mongrel-users mailing list