質問

My application is hosted on Heroku. It's Ruby 2.0, Rails 4.0.4 and Unicorn.

After each request, memory consumption of my Rails application gets significantly higher. Is this an expected behavior? When does a Rails application free the memory it's been using? I've heard that since Ruby has it's own garbage collector and I thought we wouldn't need to do anything to free the memory.

Another weird thing is, memory consumption increases little by little even without any visit.

2014-05-06T10:11:33.164073+00:00 heroku[web.2]:  sample#memory_total=320.12MB
2014-05-06T10:14:29.190443+00:00 heroku[web.2]:  sample#memory_total=321.56MB

After a Blitz session with 40 concurrent users, the consumption increases by almost 20MB. And at another session, it increases 20-30MB more...

Do you have any guess what might be wrong? What are widely made bad practices about this issue?

Thanks

役に立ちましたか?

解決

Even though I don't know about it's reasons, RAM usage was stabilized at 430MB~.

Seems like there is some kind of a caching behavior or something like that.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top