The 2GB Video That Wouldn't Upload

You know that feeling when you finally solve a problem that's been nagging you for months? Yeah, I just had one of those moments.
The 2GB Video That Wouldn't Upload

For over half a year, I’ve had this one stubborn video sitting on my phone, refusing to upload to the Immich instance running on my TrueNAS. Every time I’d check, there it was:

Error(null) uploading 1000017784 | VID20240202090636.mp4 | Created on 2024-02-02 08:22:55.000Z
ClientException with SocketException: Read failed (OS Error: Connection reset by peer, errno = 104), address = immich.mydomain.local, port = 41094, uri=https://immich.mydomain.local/api/assets

The video was just over 2GB. Apparently big enough to cause problems.

I tried debugging it multiple times. Checked the mobile app logs. Dove into the Immich container logs. Found… nothing helpful. So I’d shrug, think “it’s just one video,” and move on for a couple of weeks or months.

Today, while thinking about boat-watching I did in the summer, it hit me: Nginx Proxy Manager.

NPM sits between my phone and the Immich container. And this reverse proxy, has defaults. So it was just a Google search away for me to find that it is including a client_max_body_size limit of around 1GB.

Now it all made sense. The video was bigger and NPM was saying “nope, too big” and dropping the connection.

One line in NPM’s proxy host advanced settings:

client_max_body_size 0;

That’s it. Upload worked immediately.

Funny to think how many times a day was my phone trying to upload that video? How much of it was getting through before hitting the 1GB wall and failing? How many gigabytes of data were just… flying around my home, accomplishing nothing, day after day, for a half a year?

Now if you’ll excuse me, I need to go hug my router and apologize for what I put it through.


No comments yet.