We had our app creating a new context for each request and memory usage went off the charts. But when we move it out to a global variable, memory stays pretty stable.
I am running into this issue too. I think the problem is handlebars is not releasing the partials from memory. I see them getting stuck in the WeakRefMap in therubyracer gem.
We had our app creating a new context for each request and memory usage went off the charts. But when we move it out to a global variable, memory stays pretty stable.