ass icon indicating copy to clipboard operation
ass copied to clipboard

[BUG] Connection killed if upload takes longer than 5-10 min

Open singlekeycap opened this issue 2 years ago • 0 comments

Is there an existing Issue for this bug?

  • [X] I have searched the existing issues

Expected behavior

Upload completes and a URL is returned (with accurate filesize)

Actual behavior

Upload loops once using ShareX, then fails with "Connection killed by remote host". For curl, upload takes forever with no output, then fails with a similar error. For a smaller file (>1GB, <10GB), filesize shows "NaN undefined"

Steps to reproduce

For incomplete uploads:

  1. Upload a large (10+GB) file using CURL or ShareX.
  2. Wait for the upload to hang/crash (5-10min)
  3. Error should show in terminal (Linux) or ShareX (Windows)

For incorrect filesize:

  1. Upload a semi-large (>1GB, <10GB) file using CURL or ShareX.
  2. Wait for the upload to complete.
  3. Access response URL, should see "NaN undefined" for size

Logs (optional)

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

Request URL:
https://uploads.singlekeycap.ml

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)

ass version

0.14.2

Deployment

Manual

Operating system

Ubuntu Server 22.04LTS

Node version

v18.12.1

singlekeycap avatar Jan 20 '23 23:01 singlekeycap