Reputation: 1831
Environment: Rails 3.0.4, Passenger/Nginx
When I look at the output of 'top' on my production slice, a fresh instance starts around 110MB and grows slowly over time (a few days) to around 200MB. Is that to be expected as various objects are cached? Or is it more likely a memory leak somewhere.
I've tried to eliminate all the usual problems: have replaced any 'find.all' with 'find_each', only load the necessary columns in associations etc. etc.
I'm mostly curious whether this is typical of what people are seeing in their own environments i.e. a 2x doubling in the memory footprint.
Upvotes: 1
Views: 200
Reputation: 19145
Continuous growth like that sounds like a memory leak.
An easy work around is to roll your Passenger workers every n requests using the MaxRequests directive.
Upvotes: 1