Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running sites on "localhost" is extremely slow

Having real trouble using my localhost to test sites. It runs extremely slowly! Sometimes it takes up to a minute to load a page. I'm using Firefox and the sites I'm testing run fine on other developers in my office's local machines / on the production server.

I've gone through the normal things :-

  1. Disabled IPv6
  2. Not running in debug mode
  3. Put the site in the highest app pool (High Isolated) on IIS 6.
  4. Taking of firewalls etc.

The problem only seems to occur when hitting pages which contain some form of .net code in the code-behind.

Appreciate that this a little bit of a vague topic / stab in the dark but would appreciate any sort of advice - it's horrible waiting a minute each refresh to try out a change!

Cheers, Sean.

like image 424
royse41 Avatar asked Mar 05 '10 11:03

royse41


People also ask

Why does localhost take so long to respond?

The 'taking too long to respond' error indicates that there is a communication problem between the target server and the client (your web browser). It means that the targeted server is taking a long time to send a response to the client. The error is usually sent if the client cannot get a response within 30 seconds.

Why is Wordpress slow on localhost?

Based on my previous experience, one of the most common reasons of slowness is caused by your code trying to connect to MySQL server via 'localhost', which then resolved to the IPv6 address ::1. However, for XAMPP package, MySQL server is not listening to this address by default.

Why is local IIS so slow?

An IIS or ASP.NET hang can cause your website to have slow page loads, timeouts, or 503 Service Unavailable errors. Hangs can be caused by blocked ASP.NET threads, bad configuration, or request queueing.


1 Answers

I had the same problem with PHP. I solved it by changing "localhost" to "127.0.0.1" in database connection parameters like someone suggested here: https://serverfault.com/a/444338/62739 . I think it may work for you too, give it a try.

like image 105
grongor Avatar answered Oct 02 '22 09:10

grongor