Rails dev with WEBrick really slow in a VmWare Virtual Machine
I've been playing around with Ruby on Rails 3 in a linux Virtual Machine and I've found it **slow as hell**.
It turns out, that the rails development server WEBrick, by default, does a reverse DNS lookup for every incoming HTTP request on the IP address that makes the request. This is fine when that IP address is localhost, but it's a problem when your machine is remote or virtual.
To fix this, you just need to find the config.rb file under /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick and change the following line from 'false' to 'true':
:DoNotReverseLookup => true,
Back to work!
Comments
Leave a comment
Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
Comment by jay [Visitor] · http://lilx.net — 10/02/11 @ 09:36
Thaaaaanks!
S.
Comment by Simmessa [Visitor] · http://simmessa.com — 12/28/11 @ 01:10
You are my freaking hero!
I been strugling with this for months, I couldn't believe it was so slow. Installed rails-dev-tweaks, newrelic, everything, and I couldn't find out what was causing it.
I can't belive I didn't found this long ago.
Just, thanks.
Comment by Zequez [Visitor] — 01/20/12 @ 00:52
Comment by Andrew [Visitor] — 02/25/12 @ 21:31
Comment by Ed Kelly [Visitor] · http://www.edkelly.co.uk — 03/13/12 @ 23:07
http://stackoverflow.com/questions/1156759/webrick-is-very-slow-to-respond-how-to-speed-it
Comment by prusswan [Visitor] — 08/02/12 @ 03:33
Comment by David [Visitor] · http://www.xuvasi.com — 09/16/12 @ 02:29
Comment by Roberto [Visitor] — 03/24/13 @ 08:11
I ended up setting up a dual boot system with ubuntu.
Comment by Chut Yee [Visitor] — 05/07/13 @ 11:23
Comment by Satish [Visitor] — 05/15/13 @ 21:33
Comment by Ben Wilman [Visitor] — 07/12/13 @ 09:03