-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Delegating File downloads sends incomplete chunks [SPR-15949] #22194
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
Comments
Brian Clozel commented Hello Alexander Wilhelmer, Thanks for all your efforts; thanks to your detailed description, we've managed to narrow things down to a (possibly fixed) bug in reactor-netty. Could you try upgrading your application to Spring Boot |
Alexander Wilhelmer commented I tried with 2.0.0.BUILD-SNAPSHOT. !screenshot-1.png! I found a file, which nearly always produce the error. But it contained personal data, so i can't make it public .... It has 221.182 Bytes and on disc 221.184 Bytes. Maybe it helps.... |
Brian Clozel commented The test you're using doesn't look quite right to me. You're asking for a Rewriting that test to reduce it to a |
Alexander Wilhelmer commented The test isn't active and don't makes sense, cause requests against localhost are working fine. The Server is running with RC3. I tested with SNAPSHOT on a local server from my employer. I can deploy the app with SNAPSHOT on the server in the evening today. |
Alexander Wilhelmer commented I updated the reference project to SNAPSHOT and added a remote test and corrected the local test. This is the error on the RemoteTest:
So you can see that always the last chunk is missing, i saw the chunk size is 4096 bytes. |
Alexander Wilhelmer commented The remote server is already deployed with SNAPSHOT |
Brian Clozel commented Yes, Violeta Georgieva managed to reproduce the issue on her gear. I couldn't reproduce it on win8 + in a local VM. You're right, the network probably comes into play. We're still looking into this. This is not related to reactor-netty as a server, since this repro project is using Tomcat. So this might be the client, or a subtle combination of several things. Thanks for your efforts! |
Alexander Wilhelmer commented I tested on a remote linux instance. No errors. Localhost no errors too. |
Alexander Wilhelmer commented i will test it with jetty and undertow too now. so the server might be offline for some moments. |
Alexander Wilhelmer commented With Jetty: With Undertow: |
Alexander Wilhelmer commented BTW. Today i saw this error on a JSON only endpoint with a array with a lot of data (30 elements with ~20 attributes, very unusual!).It can be the same cause, so this problem can maybe more critical for windows hosts. |
Violeta Georgieva commented Hi, I can reproduce the issue only with Tomcat/Jetty as runtimes. I prepared here a PR with a change that ensures the last flush. Do you think you can rebuild on your side and test the change? Regards, |
Alexander Wilhelmer commented Hi, thanks for your great work. I updated my server and run this test five times. Can't reproduce now with your PR. |
Brian Clozel commented Thanks for the hard work Violeta Georgieva and Alexander Wilhelmer - this is now in master! |
Alexander Wilhelmer opened SPR-15949 and commented
I noticed problems when u using this construct:
You have to use a HTTP source with transcoding: chunked header without a content-length header. The problem of incomplete chunks only appears when you deploy the spring application on a windows system. I can't reproduce it on linux e.g. ubuntu. I'm using Windows Server 2008 R2 and Windows Server 2003, both with java 1.8 update 144. Requests against localhost works too, you have to stream over network!
Example: I deployed the app on windows. Just call http://217.79.182.40:8091/download/stream/102400 a few times. You will get a Network Error sometimes (1-3 errors on ten attempts). I'll keep that server online for max 7 days.
Source see at reference URL.
Affects: 5.0 RC3
Reference URL: https://github.com/awilhelmer/streambug
Attachments:
Issue Links:
Referenced from: commits ec2218c
The text was updated successfully, but these errors were encountered: