Well, that was fun… I spent quite a bit of time today beating my head against a “memory leak” only to remember that JRuby + Rails + Development mode = very leaky. Switch to production mode and the problem goes away.

A simple little Rails app with one controller and one model is all that is needed to exercise the problem. Run rails in development mode, and hit it with requests, memory usage soon skyrockets and the app starts to fall over. Switch to production mode and the same app runs really nicely 🙂