-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Upload start failing on internets with 1mbps upload ( Like ADSL ) with XHTTP packet-up over CDN or/and DIRECT. #4100
Comments
我也觉得这个问题仍存在,上次 #3972 (comment) 只是修好了一部分 你可以换用 XHTTP stream-up H2 over CDN 作为临时解决方案,如果你需要 H3 下行,可以设置上下行分离 |
Does packet-up mode parallelize HTTP packets? If the answer is no, perhaps parallelizing HTTP packets can solve this problem. I said before that I have no understanding of coding, but the things I saw and heard were as follows: Maybe you can leverage goroutines, which are lightweight concurrent threads, along with channels to manage the flow of data. by using goroutines, you can handle multiple upload tasks concurrently, Then, Synchronize using channels function:we ensure that all goroutines complete before finishing. |
I did some tests to find the issue |
@deepsm0ke XHTTP packet-up 的 POST 请求就是并发的,不等上一个请求收到响应就会发下一个 @dragonbreath2000 可能是服务端重组乱序包的问题或者乱序包太多给服务端整 OOM 了,但直连不应乱序,也可能是中间哪个包丢了没能自动重传,但直连不应丢包,所以的确可能要去其它方面找问题 另外 packet-up 模式默认的 1MB 加最大 100 并发导致上行缓存是 100MB,有些测速会先直接起飞再遇到 back pressure |
#4148 (comment) 差点忘了 Xray 的 quic-go 没升所以有可能是它的问题,你们换 packet-up H2 试试 |
或者你们试试把 quic-go 升到最新版看能不能解决问题 |
I changed quic-go version in go.mod to 0.48.2 and buit ray,no diffrence, |
I said it first. This problem exists on packet-up mode, whether without TLS or vice versa, i.e. with TLS on http1.1 or h2 or h3, even if there is no CDN in the middle and the connection is direct (client<->server). If the client's internet upload is higher than 1mbps, even if it does not fail sometimes, it will slowly start uploading in packet-up mode, but if it is less than or equal to 1mbps, it will not. This problem does not exist in stream-up mode and it will easily start uploading, no matter how slow it is, but eventually the upload will start and will not crash or stop. |
我觉得有可能是网速跟不上等待太久导致 HTTP 客户端自动重传了就一直堵着然后服务端也傻了,或者服务端缓存太多 OOM 了 你们试试把客户端 |
3MB/s 还存在问题的话就试试 10000 即 0.3MB/s,1000 即 0.03MB/s,如果没问题了的话那应该和乱序包无关 |
总之直觉是 back pressure 没到位的问题 |
但我查了一下至少 Go 官方 HTTP 库的 POST 不会自动重传,GET 会, |
或者可能后调用的 client.Do() 有更高的优先级,导致前面的包还没传完就先传后面的包,前面的包就一直没传到,尤其是小水管 |
some times ray shows me this in logs,is this expected?: |
@dragonbreath2000 I'm not sure. Try #4100 (comment) |
lowering scMaxEachPostBytes does improve it quite a bit ,does not get oomed right away and speedtest goes better,but sometimes it still gets stuck |
@dragonbreath2000 调到多少基本上没错误?此时的上行测速结果是? |
scMaxEachPostBytes of 50000 or 100000 did not fail speedtest mostly,which is good enough with my crappy isp(only for h2,for h3 it did not even begin to upload) |
When I set the |
那应该就是 back pressure 没到位导致的各种问题,这个本来就应该等上个 POST 把数据写进系统网络栈后再弄下一个 POST,我看了下 Go 的 HTTP 库的 trace 有个 WroteRequest 应该能用,如果 quic-go 也有这个 trace 的话 |
Now I tested with a different configuration: I set the |
#4150 我用了 WroteRequest 以确保“等上个 POST 把数据写进系统网络栈后再弄下一个 POST”,不过 quic-go 貌似也不支持这个 tracepoint,你们试试 h2:https://github.com/XTLS/Xray-core/actions/runs/12269113619 |
显然今天的版本等不上 #4150 ,我在考虑把 |
* Add wroteRequest (waiting for new quic-go) * Use XTLS/quic-go instead * Client doesn't need `scMaxConcurrentPosts` anymore * GotConn is available in H3 * `scMaxConcurrentPosts` -> `scMaxBufferedPosts` (server only, 30 by default) Fixes XTLS#4100
Integrity requirements
Description
The problem that has been and still is that the upload speed ( Download speed is ok ) and stability on ADSL is not good at all (except for Annex M mode, which has relatively good adsl's upload about 3mbps). On the other hand, other transports like Websocket or httpUpgrade Over CDN ( Tested on CF ) have good upload on ADSL (It uploads slowly, but the important thing is that it starts uploading, whereas with splithttp it doesn't even start uploading.), but in XHTTP(splitHTTP), we may have to wait (even in h3 alpn mode or even in h2 mode!) for nearly 2 minutes (Maybe or maybe not) until only 128kb of that file is uploaded!.
Reproduction Method
I really have no idea how to fix this problem and I don't know how to coding, but I was eager to help.
Client config
Server config
Client log
No Errors but, when using h3 mode v2rayN show :
connection doesn't allow setting of send buffer size. Not a *net.UDPConn?. See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.
Server log
No Errors.
The text was updated successfully, but these errors were encountered: