Apache Lounge



Forum Index Downloads Search Register Log in  RSS Apache Lounge

Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.



A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.

"Blocking" / slow on local windows-system

Post new topic   Reply to topic    Apache Forum Index -> Apache

View previous topic :: View next topic  
Author Message

Joined: 15 Feb 2013
Posts: 5

PostPosted: Fri 15 Feb '13 13:43    Post subject: "Blocking" / slow on local windows-system Reply with quote


I have a website on a linux-server working fine with PHP/Apache. The page loads a lot of css/js/image-stuff (total 84 requests, 220k), it takes about 4 secs to load via internet.

Now I'm testing the same page locally on a Win7-64-system (Apache 2.2, PHP 5.4). The system is not very slow (8 GB RAM, SSD, i7-CPU), but loading the same page as above takes about 50 secs.

The Q is: What might be the problem?

- I turned off firewall and anti-virus.

- I used mod_status: 150 threads, max. 11 seems to be used during the loading of the page.

- I tried php5apache2_2.dll with TS-PHP 5.4 and mod_fcgid.so with NTS-PHP 5.4, but the loading-time kept almost the same.

Looking at the "network-tab" in FF or Chrome, I found that a lot of subqueries get a timing like this:
Blocking: 11.96 s
Sending: 0
Waiting: 1 ms
Receiving: 6ms

So the loss of time seem to be in the "blocking"-section. I first thought of something like "limited number of TCP-Connections", but as said above, on the same system the page is remotly loaded fast enough almost without these "blocking"-parts.

Any ideas what might cause this?
Back to top
James Blond

Joined: 19 Jan 2006
Posts: 6600
Location: Germany, Next to Hamburg

PostPosted: Fri 15 Feb '13 22:39    Post subject: Reply with quote

Did you some internal benchmark? Use MySQL? Tunes that?
Back to top

Joined: 15 Feb 2013
Posts: 5

PostPosted: Sat 16 Feb '13 10:53    Post subject: Reply with quote

Thanks for your reply. I just figured it out:
I had to add localhost
to my hosts-file.

I have no idea why this is the case, the domains are named like: example.local
to access them in the browser via "http://example.local", but now it works faster than fetching the page over internet.
Back to top

Joined: 02 Nov 2012
Posts: 24
Location: United States

PostPosted: Wed 20 Feb '13 23:34    Post subject: Reply with quote

Ah, yes, this is an oldie-but-goodie.

I recommend that you change all "localhost" references to "", too, particularly in your MySQL connection parameters.

For details, see http://www.borngeek.com/2011/04/05/mysql-performance-and-localhost-performance/ (and the many other articles on this subject).
Back to top

Post new topic   Reply to topic    Apache Forum Index -> Apache
Page 1 of 1