New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/http: "AcceptEx:The specified network name is no longer available" on Windows 64-bit #3256
Labels
Comments
Also please take a look at issue #3219 which describes my blunder. I feel something like get lost in the forest of Windows. |
I am not network expert, so ... :-) "The specified network name is no longer available" have name of ERROR_NETNAME_DELETED. Google for "AcceptEx ERROR_NETNAME_DELETED", maybe some of it apply to your case. As far as Go concerns, I can't see any problem. net package calls AcceptEx to receive next connection and the call fails with ERROR_NETNAME_DELETED, means someone connected, but we could not established connection for one reason or the other. As you said, it could be anything - bug in software, faulty hardware. I can't reproduce it here on my computer. Alex |
Additional findings. I believe the error is caused by exhausting sockets on Windows (which isn't that hard to do). I have another program (which unfortunately I can't share in its entirety) that uses 50 goroutines to post files to this server - using client.Do() as shown in the Go example code, and using the default Transport object. It also sets Request.Close to false (just in case). In the past, it seemed like keep-alives limited the total connections to around 50. In 2012-03-04, the connections don't seem to be reused anymore. I know there were recent changes to the net/http package relating to proxies and keep-alives, but I haven't identified a bug yet, just this symptom which I think is a real problem. The basic file posting loop is at http://pastie.org/3555622 - in older versions of Go I had tested the connection behavior pretty thoroughly. |
Ok, maybe this is by design but I didn't notice it before. If I use my own Transport, like: var tr = &http.Transport{DisableKeepAlives: false, MaxIdleConnsPerHost: 50} Then connections are far more likely to get reused, and you don't run out. This is certainly helpful when heavy load is involved. I can't imagine how I didn't run into this when I originally coded it under go 60.3, but it seems to make sense according to net/http docs. |
Comment 11 by jp@webmaster.ms: I have this issue. Windows 2008 Server Go binary distribution from the download page (go1.0.1.windows-amd64.zip) http server panics with "AcceptEx:The specified network name is no longer available" after few hours of working |
Comment 12 by jp@webmaster.ms: w.Header().Set("Connection", "close") helps but degrades performance Transport seems not applicable to a server app |
Comment 13 by webmaster@webmaster.ms: I solved it by compiling my program with 8g instead of 6g. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Attachments:
The text was updated successfully, but these errors were encountered: