-
Notifications
You must be signed in to change notification settings - Fork 18k
x/net/websocket: Getting "unexpected EOF" when trying to connect more than 28 connections to websocket server. #955
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
Labels
Milestone
Comments
On the 28th run, the web socket client key 1 ends with 2 space characters. Since the websocket code doesn't quote the strings for the key, the 2 trailing spaces are stripped. This results in the websocket server handler rejecting the GET request and not returning information. Since the client doesn't read back any information when it expects to, this causes the unexpected EOF, triggering your panic. The attached patch to client.go addresses this issue. Attachments:
|
Currently being addressed by: http://golang.org/cl/1669056/show Status changed to Started. |
Hi. Thank you very much for responding for this quickly. I applied the patch and working fine. I have a further questions. 1. How did you find out the 2 space characters? Are there any go related debugging tools, or you just read the code and found out? I just started learning golang, so any debugging tips are appreciated. 2. How many connections can you make? When I tried websocket2.go (see the attached), it starts failing once it reaches over 1000 connections (but the failure timing is not consistent. Sometimes goes more than 15000, and some times fails around 1000). I do expect that I can make at least 20,000 connections easily, as I was able to using ruby websocket server (note: ulimit is set to 100000). I know I should not really make this many connections, but I am kind of trying to push the boundary, since this is regression test script. http://gist.github.com/491379 3. Does the script work on all environment? I can make certain number of connections when I try with OSX. When I try with Linux Ubuntu (Linux vm02.staging.pusherapp.com 2.6.32-305-ec2 #9-Ubuntu SMP Thu Apr 15 04:14:01 UTC 2010 i686 GNU/Linux), I get "connection refuesed" error message and can not connect any. http://gist.github.com/491387 Attachments:
|
Fixed by http://code.google.com/p/go/source/detail?r=2ccf0549da35. The number of connections you can make depends more on the operating system than on Go. See issue #66. To keep discussing the number of simultaneous connections it would be best to move to golang-nuts@googlegroups.com Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by inouemak:
Attachments:
The text was updated successfully, but these errors were encountered: