Closed tanner0101 closed 7 years ago
Right now the error occurs anytime more than ~260KB is returned in a response. Our error pages are ~500KB so they are failing to load entirely.
If you think there's a better way to implement this that we can do in a patch or minor fix let's do that. The overhead of chunking bytes with this solution is not ideal.
If not, we can postpone your solution for a later 1.x or 2.x and get this fix in sooner than later as it's a fairly critical issue.
Server error: respond(Transport.StreamError.send("There was a problem while sending data.", Socket failed with code 0 ("Undefined error: 0") [sendFailedToSendAllBytes]))
bytes sent: 261676
bytes in data: 508903
When this does get merged, how do we go about getting these changes? Just vapor build --clean
?
@mcdappdev yep vapor clean && vapor build
@andreasley you're right. I'm also seeing failures above 2MB. Closing in favor of #101.
Does this actually help with large transfers? I noticed that transfers fail in nonblocking mode if they are larger than the socket can handle. I've implemented nonblocking sending in my fork after trying something similar to this PR, which didn't work because the socket still was not ready to receive more data.
I was planning to create a PR for some changes anyway. https://github.com/vapor/socks/pull/95 already contains part of them, but nonblocking sending is more recent and not included there (yet).