
{"id":1334,"date":"2013-07-28T20:46:15","date_gmt":"2013-07-29T00:46:15","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=1334"},"modified":"2013-07-28T20:46:15","modified_gmt":"2013-07-29T00:46:15","slug":"apache-acceptex-weirdness","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=1334","title":{"rendered":"Apache AcceptEx Weirdness"},"content":{"rendered":"<p>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 &#8220;install me and enjoy&#8221;. 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.<\/p>\n<p>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.<\/p>\n<p>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:<\/p>\n<p><code>[warn] (OS 64)The specified network name is no longer available.  : winnt_accept: Asynchronous AcceptEx failed.<\/code><\/p>\n<p>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.<\/p>\n<p>I Googled the message but did not find anything about what it actually means. What is &#8220;network name&#8221;, who specifies it, and why is it &#8220;no longer available&#8221;? 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.<\/p>\n<p>So, for starters I disabled <code>IPv6<\/code> 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 <code>AcceptFilter http none<\/code> in the Apache config. That did not help either. Finally, I had to use <code>Win32DisableAcceptEx<\/code> and that seemingly took care of the problem. Make sense: if there is no <code>AcceptEx<\/code> call, it cannot fail. Some people on the Internet talk about some vague &#8220;performance problems&#8221; that this might cause, but hey, virtually anything is better than waiting 10 seconds for the server connection.<\/p>\n<p>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&#8217;t research &#8217;em all, I am afraid.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;install <a href=\"https:\/\/ikriv.com\/blog\/?p=1334\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[17,4,18],"tags":[],"class_list":["entry","author-ikriv","post-1334","post","type-post","status-publish","format-standard","category-apache","category-hack","category-win32"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1334","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1334"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1334\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1334"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1334"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1334"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}