Skip to content
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

i/o timeout when client use ws to connect to server #74

Open
kuyagic opened this issue Mar 6, 2018 · 2 comments
Open

i/o timeout when client use ws to connect to server #74

kuyagic opened this issue Mar 6, 2018 · 2 comments

Comments

@kuyagic
Copy link

kuyagic commented Mar 6, 2018

I meet many io timeout when download large file
server use http and client connect to server with ws://server_ip:port
always failed to download after 5 seconds using curl

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  9  100M    9 9351k    0     0  1868k      0  0:00:54  0:00:05  0:00:49 1993k
curl: (18) transfer closed with 95281283 bytes remaining to read

client side log

local_server.go:254: Failed to read proxy http request to cachefly.cachefly.net:80 for reason:read tcp 127.0.0.1:1889->192.168.11.10:42608: i/o timeout

server side log

2018/03/06 14:49:07 remote.go:33: [7]Start handle stream:&{tcp cachefly.cachefly.net:80 5000 0 []} with comprresor:none
2018/03/06 14:49:07 stream.go:221: [7]send window is ZERO
2018/03/06 14:49:08 stream.go:221: [7]send window is ZERO
2018/03/06 14:49:08 stream.go:221: [7]send window is ZERO
2018/03/06 14:49:08 stream.go:221: [7]send window is ZERO
2018/03/06 14:49:08 stream.go:221: [7]send window is ZERO
2018/03/06 14:49:08 stream.go:221: [7]send window is ZERO
2018/03/06 14:49:08 stream.go:221: [7]send window is ZERO
2018/03/06 14:49:08 stream.go:221: [7]send window is ZERO
2018/03/06 14:49:08 stream.go:221: [7]send window is ZERO
...many more same ZERO
@yinqiwen
Copy link
Owner

yinqiwen commented Mar 7, 2018

the send window is ZERO means the connection between your local machine & remote websocket server is too slow to send the file data.
and can u modify the line https://github.com/yinqiwen/gsnova/blob/master/local/local_server.go#L250 to large timeout value and retest again? seems this timeout is caused by this 5s timeout setting.

@kuyagic
Copy link
Author

kuyagic commented Mar 7, 2018

I think the speed 1993k/s is not slow.....

yinqiwen added a commit that referenced this issue Mar 7, 2018
yinqiwen added a commit that referenced this issue Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants