-
Notifications
You must be signed in to change notification settings - Fork 57
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
Random sockets not opening #81
Comments
Refer PR #86, appveyor tests for Julia 0.6.2 on Windows 32 bit https://ci.appveyor.com/project/hustf/websockets-jl-nfuiv/build/1.0.12/job/vvlhiu2xaxw0q5m7 Also refer issue #84, quote @samoconnor
we see two probably different causes. The logs are a tedious read so I summarize:
We see that two seemingly different sockets have been assigned the same socket id, number 4:
This occurs the first time this session we try to upgrade a socket to websocket with subprotol, which is a weak indication that two sockets gets the same id assigned due to Julia compiling some functions. Internet Explorer fails to load browsertest2.html. The script that navigates there from browsertest1.html has clearly been run. We never receive a connect event, and this is a different browser. |
This was due to blocking asyncronous calls. Servers are still easily overloaded. |
The randomness makes this hard to document, but it seems a httpsocket sometimes get assigned the same number and one of them basically stalls. For the current version of tests, the number of simultaneous sockets has been reduced to alleviate the problem.
This functionality comes from HtttpServer, which currently has some deprecation warnings and may have slower reaction than normally.
Of course, to debug, one needs to temporarily add some logs in HttpServer. But such logging takes more time than just opening a socket and is likely to increase the problem.
It may seem to be less of a problem on cygwin / julia compiled with 8 threads than on the downloaded binary. HttpServer opens sockets as async tasks, not threads or processes.
The text was updated successfully, but these errors were encountered: