-
Notifications
You must be signed in to change notification settings - Fork 94
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
Error with file upload on slow network #89
Comments
hi, have you tried starting misultin with the you may consider increasing this timeout, or even setting it to also: how are you trying to upload the file? chunked encoding? please let me know and we can go on from there. r. |
I haven't tried, are you saying it considers the file upload as a single operation? In that case it'll timeout if the file takes longer than 30s to upload, even if it has received data 1 second ago, correct? I will try now with I'm uploading the file via a form with
I'm not aware of the possibility of using chunked transfer-encoding when doing file uploads. Will post back soon. |
Ok, so setting It seems like it's a compromise though, because it is receiving data, but the timeout is not considering that—it views it as an "atomic" request/response, instead of a stream. Unless I'm mistaken, it should timeout only if it hasn't received any data in Am I missing anything? anything we can do? |
Hi, sorry for the The timeout is defined as per the gen_tpc:recv/3 function specs. The code in misultin that is issuing the timeout is here. I'd believe too that Timeout relates to the maximum allowed time for a socket to not receive any data, however just in case I've posted a question to the Erlang Questions mailing list. FYI, you can do chunked transfer-encoding file upload in misultin, server-side example here. r. |
Hmm I see.. but are you sure it isn't an internal erlang message which is timing out in this case? Like here: https://github.com/ostinelli/misultin/blob/master/src/misultin_http.erl#L202 for example? I see how I can do chunked-encoding server-side, but my understanding is that it can only be used for http responses, not requests.. is that not correct? Or do you mean a chunked response might help here? |
Yes. The I've received a reply in the mailing list. This is very interesting, and I'll provide a patch asap. I'll ping you to test it with your configuration too, and see if that solves it. As far as your other question, the example I've linked demonstrates how to read chunked encoding from requests. This is useful to provide upload streaming functionalities, for instance. r. |
Very interesting indeed, it seems like with that fine-grained control, there can be a solution! I'll be awaiting your patch. About the chunked-encoding, the thing is I don't think it is possible to force it from the browser. |
I've tested some patches. these solve this issue, however introduce unnecessary complexity / slowness for 'normal' connections. currently the only solution i can see is increase the timeout, which is an option already provided. if you have any input do not hesitate. |
thank you for this. misultin has been discontinued, my reasons here. r. |
I'm testing the file upload functionality with an intentionally crippled network, and getting some timeouts after long file uploads (> 1 min). Here's the setup:
Cap network bandwidth to 600Kbit/s and add 50ms latency:
Here's the error I get after about 1.5 minutes of a 900K file:
Misultin version is
0.9-dev
(current master I think)Any ideas why it's timing out? I'm tracking the file progress, and it seems like it's being uploaded...
Note: everything seems to work fine without the artificial network delay, and everything but file uploads work fine with the delay. I'm just worried this could happen when the site is live.
The text was updated successfully, but these errors were encountered: