sylv/micro

Error uploading large files

Closed this issue · 2 comments

When attempting to upload a large file (video) and with the .microrc file changed to allow larger files + rebuilt, ShareX prompts an error about 15% into the upload. My guess is that the 50MB limit being changed in the .microrc isn't actually changing the limit within the app.

Error message:
Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.

Request URL:
https://my.url/api/sharex?input

Stack trace:
   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.Security._SslStream.StartWriting(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.Security._SslStream.ProcessWrite(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
   at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at System.Net.ConnectStream.InternalWrite(Boolean async, Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state)
   at System.Net.ConnectStream.Write(Byte[] buffer, Int32 offset, Int32 size)
   at ShareX.UploadersLib.Uploader.TransferData(Stream dataStream, Stream requestStream, Int64 dataPosition, Int64 dataLength)
   at ShareX.UploadersLib.Uploader.SendRequestFile(String url, Stream data, String fileName, String fileFormName, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, HttpMethod method, String contentType, String relatedData)
sylv commented

I can't recreate this. I tried up to a ~1.2gb video as well as a couple smaller ones and none had issues uploading or streaming. The only issue I could find was if the video was under the upload limit, ShareX wouldn't handle the error properly and would get stuck at 0%.

The only other things I can think of is if your proxy is imposing its own limits or micro is trying to buffer the entire video into memory and crashes, which shouldn't happen. If you can recreate it with the latest docker image with no proxy in between then I'll take another look.

Just decided to take another look, it was Cloudflare.