Post by Peter Cooper on September 21st, 2006
Control your Rails Process Sizes with Ruby 1.8.5

- Request Database Authentication When Rails Starts
- Monitoring memory use on each request in Rails
- Interesting Ruby Tidbits That Don’t Need Separate Posts #20


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.

Click here to add on del.icio.us








