This project is archived and is in readonly mode.
Block in a loop: huge memory claim that can kill your server (3.0.7)
Reported by Roland Pallai | May 22nd, 2011 @ 08:16 PM
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.
No comments found
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>