Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Control your Rails Process Sizes with Ruby 1.8.5

By Peter Cooper / September 21, 2006

Eric Hodel has looked at a new feature provided by Ruby 1.8.5 called Process::setrlimit. It makes it easy to limit the memory usage of your Ruby processes.. ideal if you're experiencing memory leaks! Eric shows an example that's as simple as adding this to your application's environment.rb file:

Process.setrlimit Process::RLIMIT_RSS, 1024*1024*150, Process::RLIM_INFINITY

Of course, this isn't a Rails only feature.

Other Posts to Enjoy

Twitter Mentions