I have MAMP setup on my laptop to develop a site locally. Every now and then one or two of the assets on the website take roughly 7 seconds to load (see below). More specifically it’s in the “waiting” state for about 7 seconds. It doesn’t matter what filetype it is (css, javascript, image) as you can see below. This doesn’t happen on the production server, but happens about every other page load when accessing the site on my mac. I’m guessing it could be an apache settings, but I’m not sure what. Any ideas what this might be?


I finally figured out what was going on for me and how to fix it. I wasn’t having the same issue as most OSX/Apache people (where their entire some-website.local was loading slowly). For me it was an Apache configuration setting.
Chrome makes six simultaneous connections (I think) to a server in order to load the page quickly. I believe FireFox is something like 15? Anyway, the MAMP setting for Apache’s ServerLimit directive was apparently only 5, which is rather low. Every 6th connection of mine was getting hung up, and apparently the timeout was around 6-7 seconds. All I did was bump up the following directives from their default settings:
Those numbers should obviously be adjusted depending on your needs, but 20 seemed good for me. Hope that helps anyone else who has run into this problem…