Tom Copeland's Recent Posts

RSS Feeds

« Better Subversion to Git documentation on RubyForge | Main | Lovely SVG railroad diagrams with JavaCC and Clapham »

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83451d3c069e201156fca8ac0970c

Listed below are links to weblogs that reference Updating the PassengerMemLimit patch:

Comments

setrlimit wasn't fully implemented in OS X, so you can't limit RSS and some other things. I wanted to use this on OS X for limiting Rails' process growth back in the early days and heard this from some other OS X guy.

@drbrain, cool, thanks for the info! Yeah, my googling brought me across your Process::setrlimit post from 2006... it's a bummer.

Tom, if you haven't seen my recent post about memory usage in Ruby daemons, give it a look. It's solved our mysteriously large daemon problem. Your solution sounds like a good backup in case of memory leaks, etc.

http://www.mikeperham.com/2009/05/25/memory-hungry-ruby-daemons/

@mike, that's great info. I'm also using REE and will be rebuilding it with those settings. Thanks for the pointer!

I've been using a scheduled ruby script to do this sort of thing. The nice thing about it is that it give the process time to finish up the current request before out right killing it. It sounds like this memlimit patch does not.

Anyway, you can find the script here: http://gist.github.com/41713

@wesley, yeah, this patch causes the process to quit as soon as it exceeds the memory usage. So it's pretty abrupt. But on the other hand, it'll make sure things stay under control... it's a tradeoff, definitely.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Comments are moderated, and will not appear until the author has approved them.