Mobile app version of vmapp.org
Login or Join
Sue5673885

: DNS slows down on development environment I have a local development environment setup on my Mac. I am running an Ubuntu Web Server inside of a Virtual Box VM. I setup a host file on my

@Sue5673885

Posted in: #Dns #Ubuntu

I have a local development environment setup on my Mac. I am running an Ubuntu Web Server inside of a Virtual Box VM. I setup a host file on my Mac that points my dev site to the IP of the Ubuntu Virtual Server.

Everything works good other than the fact a lot (not all) of the time it takes more than 5 seconds to load a page. I used firebug to track down where the problem is and when it's slow the DNS part of my request is taking over 5 seconds.

Like I said it's not all the time. Sometimes it resolves and loads the page within milliseconds. The same page one click will be super fast and then the next time it takes over 5 seconds.

It's really slowing me down and I am not sure what is causing it.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Sue5673885

3 Comments

Sorted by latest first Latest Oldest Best

 

@Berryessa370

This article may be relevant: www.justincarmony.com/blog/2011/07/27/mac-os-x-lion-etc-hosts-bugs-and-dns-resolution/
They ended up running their own simple dns server on their Mac because of similar issues. This might be a fairly easy solution if you already have MacPorts installed (you could also try homebrew).

10% popularity Vote Up Vote Down


 

@Cody1181609

Firebug is reporting from the host operating system and is therefore unaware of the VM's internal state - what you see as a "DNS lookup" is probably the VM starting up a worker process or otherwise processing the request before servicing the request.

You should be able to confirm whether or not this is the case by running your webserver in debug mode (-X for Apache) and monitoring the output of top within the VM.

10% popularity Vote Up Vote Down


 

@Angela700

Amazon offers one year free on a micro instance I would move from your virtual box VM and put that server on an ec2 server (plenty of ubuntu public images 10.04 LTS etc). I had problems running WAMP with an application all the DNS lookups were taking forever for some reason even though I was on my local host. I couldn't figure out the reason even with host names and IP's in my hosts file. Not so much an answer but an option, local servers and DNS get fussy some times.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme