Does Ruby 2.2 Have Memory Issues on Heroku?

后端 未结 3 1533
不知归路
不知归路 2020-12-15 22:36

Many people experienced issues with memory usage when switching their Rails app from Ruby 2.0 to Ruby 2.1 on Heroku. For example, see Memory usage increase with Ruby 2.1 ver

相关标签:
3条回答
  • 2020-12-15 22:55

    We tried Ruby 2.2.2 on Heroku's Cedar-14 stack, 2X dynos, even reducing Unicorn workers from 5 to 3, and still had memory hover near the 1GB maximum within a few hours of moderate web traffic, and swap size jumped to 200MB - 300MB.

    0 讨论(0)
  • 2020-12-15 23:02

    I gave Ruby 2.2 a try with Rails 4.2 and the same memory problems that plagued Ruby 2.1 also occurred. I am switching back to Ruby 2.0. Rails 5 will require Ruby 2.2 and higher so I hope someone will find a way to fix this.

    0 讨论(0)
  • 2020-12-15 23:09

    Ruby 2.2-2.3 introduced another bug for multithreaded C-based ruby installations https://evilmartians.com/chronicles/ruby-2_2-oom,

    basically, if stars align badly the GC turns off :P and with some sites stars align badly couple times a day, we still use Ruby 2.0 and are waiting for 2.3.5 for the fix from the blog to come out

    0 讨论(0)
提交回复
热议问题