Skip to content

Instantly share code, notes, and snippets.

@Pistos
Created February 11, 2009 04:58
Show Gist options
  • Save Pistos/61840 to your computer and use it in GitHub Desktop.
Save Pistos/61840 to your computer and use it in GitHub Desktop.
100% CPU with Thin and Ruby 1.9
With this code, CPU usage shoots to 100% when serving the index page.
% gem19 list -l
*** LOCAL GEMS ***
daemons (1.0.10)
diakonos (0.8.7)
eventmachine (0.12.5)
rack (0.9.1)
ramaze (2009.01)
thin (1.0.0)
% ruby19 --version
ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]
require 'rubygems'
require 'ramaze'
class MainController < Ramaze::Controller
def index
%{ <link rel="stylesheet" href="/style.css" type="text/css" media="screen"/> }
end
end
Ramaze.start :adapter => :thin
/* No actual CSS needed */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment