The fun started Saturday morning, when I found a brown box by my door with a new cable modem in it. The paper inside the box said something like “install me and enjoy”. This sounded like a classic beginning of a horror or spy movie: gullible user stupidly installs the gadget, and now evil monsters/foreign spies get access to his home, yadda-yadda-yadda, lots of blood and screams.
So, I called the cable company to confirm, and they told me that they indeed are rolling out new modems for better speeds and compatibility, and I should go ahead and install it.
Once I installed the new modem, my Apache server that runs on Windows started acting funny. I began to receive this warning in the logs:
[warn] (OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed.
It did happen before every now and then, but since the new modem was installed, the error message started to come out several times a minute. Not only that, but establishing a TCP connection to the web server would now take several seconds. Restarting everything (modem, router, server) did not help.
I Googled the message but did not find anything about what it actually means. What is “network name”, who specifies it, and why is it “no longer available”? There were some vague recommendations on what to do, but most of them referred to Apache 2.4.x, and I am still running 2.2.x.
So, for starters I disabled
IPv6 on the server. I had trouble with it before, and the router does not support IPv6 anyway. It seemed to help at first, but alas, it did not. Then I tried to set
AcceptFilter http none in the Apache config. That did not help either. Finally, I had to use
Win32DisableAcceptEx and that seemingly took care of the problem. Make sense: if there is no
AcceptEx call, it cannot fail. Some people on the Internet talk about some vague “performance problems” that this might cause, but hey, virtually anything is better than waiting 10 seconds for the server connection.
I am not sure how a new modem can possible influence all requests to the server, even local ones. I am even more upset about having to change the config in a black box manner, without understanding what was the actual root cause. Well, can’t research ’em all, I am afraid.