Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

Block in a loop: huge memory claim that can kill your server (3.0.7)

#6794

Rails 3.0.7 allocates a lot of memory if you do benchmark{}/silence{} in a loop:

<%= 20.times do %>
  <%= benchmark("test"){ %>
    hello world
  <% } %>
<% end %>

This one eats about 300MB RAM. 100.times{} easily killed our shared development server with 2GB RAM. Easy to reproduce on a new project too:

1. rails new railstest --skip-active-record && rails g controller test
2. fill config/routes.rb
3. put that sample into app/views/test/index.html.erb
4. wget

It's not problem for 2.3.11.

Reported by Roland Pallai · May 22nd, 2011 @ 08:16 PM

State: new
Milestone: none
Assigned to: nobody
Importance: none

Activity

No comments yet.