Large uploads fail with ECONNRESET / Job Cancelled on direct connection

Environment:
  • Immich Server (Docker Compose setup)
  • Immich Android App
  • Large file uploads (e.g., MP4 videos)
Problem:
Large uploads consistently fail partway through. Issues persists even when bypassing all network infrastructure.

Troubleshooting Performed:
  • Network Ruled Out: I tested my network stack. While the Tailscale connection is slow (~100 Mbits/sec potentially due to DERP relay), I also tested the local network directly, which is faster.
  • Proxy & VPN Bypassed: I exposed the Immich container directly to the host network. Connected from my Android phone on the same local WiFi, completely bypassing Caddy and Tailscale. Uploads still fail in those condition.
  • Disk I/O Tested: Server disk write performance was tested with fio and is not a limiting factor.
Additional Performance Observation:
  • Via Tailscale: Uploads appear to be capped at ~1 MB/s per concurrent upload (3 items).
  • Via Direct Connection: Uploads achieve speeds closer to 10 MB/s (3 items).
Relevant Logs:
  • Server Log (immich-server):
    WARN [Api:FileUploadInterceptor] Request error while uploading file, cleaning up
    WARN [Api:FileUploadInterceptor] Error: aborted
    at abortIncoming (node:_http_server:811:17)
    at socketOnClose (node:_http_server:805:3)
    ...
    { code: 'ECONNRESET' }

    Android App Error:
    TaskException: N7.h0: Job was cancelled; job=i0(Cancelling)@5379034
Questions:
  • Based on the ECONNRESET and "Job was cancelled" errors, what is causing the upload connection to be aborted? Is it a server-side timeout, or is the client app cancelling the job due to a perceived stall?
  • Are large file uploads chunked? If so, should they be resumable? The current behavior is a complete failure, requiring a manual restart. If uploads are chunked, the client should be able to resume from the last successful chunk after a connection reset.
  • Are there any server-side configurations (e.g., request timeouts, upload size limits) that could be causing this and can be adjusted?
photo_1_2025-12-08_12-18-30.jpg
photo_2_2025-12-08_12-18-30.jpg
Was this page helpful?