-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Large file uploads getting data lost and never finishing over HTTPS in 0.10.0 #5023
Comments
@indutny would you like to look into this? Sounds like the CryptoStream is locking up at some point? |
Sure. |
For tomorrow me - this might be related to this https://github.com/joyent/node/blob/master/lib/tls.js#L316 , considering comment about 160 kb of incoming data. Though, I haven't looked really deep yet. |
Fix stucked CryptoStream behaviour, happening when one of the sides locks-up in queued state. fix nodejs#5023
See #5034 |
Can you please verify that your test works with my fix? |
Sure, I'm trying to figure out how run your modified version of Node now. |
Just checkout this branch, run "./configure && make -j4 && ./node server.js" and test it with curl or whatever. |
Okay, it appears to be working. I see the |
Fixed in 14a8fb8. |
Ouch... that should be landed in 0.10 too. |
Fix stucked CryptoStream behaviour, happening when one of the sides locks-up in queued state. fix #5023
And b5ddc0c in 0.10 |
All code referenced in this issue can be found in this gist.
I've found an issue with HTTPS servers where large file uploads have data lost (if not used right away). I tested a 8MB text file that contained
This is a testfile!
repeated excessively.In the example code, the only difference between
httpsServerFail
andhttpServerSuccess
is that they use thehttps
vshttp
modules, yet only the non-HTTPS version will receive all the data from a file. My 8MB test file would only end up creating a file on the server that was around 140-160KB in addition to never causing an end event. Files that are only a few KB in size have no issues. Remember that no such issues exist with HTTP servers.In the example code, a successful upload should have the server print the following:
Whereas an unsuccessful upload will only print the following (and hang the client)
To simplify things in the clients, I used the
request
module, but I verified that it wasn't the cause by also running the followingcurl
requests via the terminal that produced identical results.The text was updated successfully, but these errors were encountered: