Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I've got a webserver running on localhost (not the one built into OSX -- a different, proprietary webserver). I do most of my web app dev there, refreshing the browser to reload, etc. This has worked flawlessly for years. Lately though I've been having a bizarre problem.

Some of the resources (different ones each time) simply aren't loading -- they show status Aborted in Firebug.

enter image description here

When I enable the deepest level of debugs on the webserver, I can verify that the webserver never sees the requests at all. The webserver does not see these requests, as if they never happened.

The only way I've found to resolve this is to restart my macbook. Other things I've tried unsuccessfully:

  • changing IP and Port - doesn't help
  • restarting loopback interface (sudo ifconfig lo0 down; sudo ifconfig lo0 up) - doesn't help
  • Have disabled all plugins/extensions in FF & Chrome - doesn't help

How can I get to the bottom of this? What kinds of issues may be at the root of it?

Here is some more info that may help:

  • OSX 10.7.5
  • Webserver is Webcluster 5.2 (a java based HTTP server my company developed -- you haven't heard of it ;)
  • The webserver is restarted often through the day -- meaning the IP+port is dropped and then reattached frequently
  • Happens both when wifi and when cabled
  • Happens both on our VPN and off it
  • Seeing this in Firefox 20.0, Chrome 26.0.1410.65, and Safari 6.0.4.
share|improve this question
1  
Shouldn't the web server logs have details on the connections that it rejects? If you are seeing the abort in 2-3 ms, it's clearly not a network timeout. What percentage of requests are failing? (More than 5%) –  bmike May 7 '13 at 17:24
    
The webserver logs do not have any record of ever seeing these connections at all -- as if they never happened. Probably 1/4 to 1/3 of requests failing, and nearly always the first few requests for the page (the page itself, first couple scripts) succeed. –  jlarson May 7 '13 at 18:21
    
Wow - I might try detaching it from all other networks and seeing if you can reproduce the problem. Localhost should be always available, but what if your VPN or other network traffic were causing contention? –  bmike May 7 '13 at 18:33
add comment

1 Answer

up vote 0 down vote accepted

This application was frequently (20+ times a day) un binding and binding the ip+port. Once I refactored this to stop doing that, it no longer has had problems.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.