HTTP (random?) connection timeout with Windows 7

Update:

  • Reinstalled Windows 7
  • Installed Windows 8
  • Various Apache tweaks (AcceptFilter http none...)
  • Installed Windows XP

Some Wireshark log

1   0.000000000 HonHaiPr_0b:36:ae   D-LinkIn_64:ca:28   ARP 42  Who has 192.168.0.1?  Tell 192.168.0.102
2   0.001844000 D-LinkIn_64:ca:28   HonHaiPr_0b:36:ae   ARP 42  192.168.0.1 is at 28:10:7b:64:ca:28

Works with XP, too bad PHP is dropping support.

Question: Should I throw router out of the window? I can't blame Windows (deep in my heart I want to)

I am experiencing (almost) random connection timeouts, with Apache on Windows7, to the extent that I'm afraid to hit F5... I cannot explain when it occurs, because I was unable to find pattern.

enter image description here

Computer that is giving me the troubles is the one that Mario wants to smack. Here is the fun part, it cannot be accessed from another Windows computer (while timeouts occur), but it can be from the Linux one. After timeout message occurs (about 30s later), it is usually working again, if not, I have to restart Apache. They are connected wirelessly to a cheap D-Link router, and later via cable.

When everything is functioning:

  • I can access from any computer
  • I can access from outside (internet) via DynDNS
  • I can access network (sharing) without problems
  • I have no headache

When it's not:

  • I can't access via HTTP (http://192.168.0.111)
  • I can't access from outside (internet) via DynDNS
  • I can access network (sharing) without problems
  • I can access from Linux computer in network
  • I can access from computer in question (http://127.0.0.1)
  • I have a mild headache

What have I tried:

  • Set MTU to 1500 everywhere
  • Updated Apache to 2.4.2 - 32bit
  • Disabled all F!r3w411z
  • Connected computer in question via Ethernet cable (timeouts are less frequent)

Extra:

I do have 2-3 vhosts defined like this:

Listen *:1337

<VirtualHost *:1337>
ServerName l337
DocumentRoot C:/git/1337
    <Directory "C:/git/1337">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

If question is too localized please do tell. Something similar: http://www.xinotes.org/notes/note/1777/

Thank you for your time.

P.S. I have tried turning it off and on again.


Solution 1:

The answer is:

enter image description here

P.S. don't expect much from cheap DLink (or any other probably) router.

Solution 2:

If you are attempting to connect using an ip address and it is working all the time from linux (I am a windows admin so I hate to say) it is most likely windows, since all the machines with issues are running windows.

Are your pings completing to and from all the windows machines when things are trying to give you a headache?

Does anything else try to run on port 80 before things go wrong? (Skype, IIS, SQL)

Have you tried setting Apache to use port 8080?

If you really think that the router is the issue, try this:

  1. take it off of the internet
  2. replace the router (temporarily) with a simple hub or switch
  3. try connecting

It is possible that the router is the issue, but cheap does not mean "doesn't work". Not every network needs the "bigger better faster more" hardware solution.