Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

localhost is slow sometimes

I'm using firefox as my default browser for my basic webdev learning process and I wish to know why when I'm doing some file transfer as ftp or p2p, accessing localhost takes so much time, as I was accessing an http server from the other side of the world.

Any idea? Do you know how top fix it?

ps: I'm using WAMP on a Windows VISTA machine

like image 839
dole doug Avatar asked Oct 30 '09 09:10

dole doug


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.

How do I fix localhost waiting?

Check your hosts file for unnecessary entries. /etc/hosts in Linux. C:\Windows\drivers in Windows. See if any other application is running on port 80. Verify that your web app is returning a response to the client.

Why does localhost keep loading?

Re: localhost keeps on loading, how to fix it? You should try using the Netstat button to see if both ports 80 & 443 are free. Its also possible that an OS error is preventing it from running. Check the Windows Event Viewer, Applications and System logs.

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.


2 Answers

type about:config in firefox address box .. continue to the settings

in the search that comes up put "network.dns.disableIPv6" .. and make sure it is set to "true"

this should solve your issue.

like image 63
Sabeen Malik Avatar answered Nov 03 '22 00:11

Sabeen Malik


To completely bypass localhost without altering any about:config properties you can install the addon Redirector and make a rule to redirect from localhost to 127.0.0.1. Use these settings

Include pattern : http://localhost*
Redirect to     : http://127.0.0.1$1

Leave the other fields empty.

like image 27
westmark Avatar answered Nov 02 '22 22:11

westmark