문제

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