开发者

Rails 3 memory issue

开发者 https://www.devze.com 2022-12-22 12:33 出处:网络
I\'m developing a new site based on Ruby on Rails 3 beta. I knew this might be a bad idea considering it\'s just beta, but I stil开发者_JAVA百科l thought it might work.

I'm developing a new site based on Ruby on Rails 3 beta. I knew this might be a bad idea considering it's just beta, but I stil开发者_JAVA百科l thought it might work.

Now though I'm having HUGE problems with Rails consuming huge ammounts of memory.

For my application today it consumes about 10 mb per request and it doesn't seem to release it either. So I thought this might be because of bloat in my application and thus I created a test app just to compare.

For my test app I just generated a model with a scaffold and then created about 20 records on this model.

I then went to the index page and hit refresh and I could immediately see memory taking off! Less than my app but still about 1-3 mb per request.

I'm working in OSX Leopard, with Ruby 1.8.7, Rails 3.0.0.beta and a SQLLite db for development.

Does anyone recognize my problem?

I would really appreciate some help here. :/

Thanks!


Well, you should consider how a production Rails app would be served. For example, the above setting (with regards to caching) is typically enabled for the production environment and you should also compare performance with your app running under Passenger (Apache or Nginx).

I do believe there is an easy means to force Passenger to play nicely in dev mode as well.


There were some memory leakage issues in the Rails 3 betas. Is there a reason you're not on 3.0.6?

Edit: D'oh, just saw the date this was asked.

0

精彩评论

暂无评论...
验证码 换一张
取 消