Jellyfin streaming issue w/ Nginx Proxy Manager (NPM)

Hi all, I hope you’re well. Need some support here as I’ve hit a dead end.

I’m using Infuse v7.8.3 on iOS, macOS and tvOS. I stream from JellyFin 10.9.11 in Direct Mode. JellyFin is running Containerised from Linuxserver.io fleet and sits behind Nginx Proxy Manager reverse proxy also running in a Container on the same machine. The host is running Debian 12 Linux.

My host has a Samsung 980 nvme drive in it. After about a year I checked the drive and was surprised to see the TBW was already at 300….which is nuts!

To cut to the chase, when my family are using Infuse to stream from JellyFin, using IOTOP on Linux I can see a huge amount of Disk writes being made by Nginx Proxy Manager (NPM) to the local nvme drive. A 4GB video file seems to generate about the same amount of writes again to NPM working directories. I can only assume NPM is caching what Infuse is asking for….but I can’t prove that.

The problem I have is when streaming via a Browser or TV JellyFin client, NPM does not write anything to disk. When using Infuse, it does.

I’ve tried playing with the Streaming Caching options in Infuse but this doesn’t seem to change any behaviours in NPM.

I’m hoping to understand why this behaviour exists when Infuse streams from Jellyfin through a reverse proxy but the JellyFin / Browser clients do not. I’m chewing through my nvme’s TBW wear using Infuse in the meantime.

Many thanks for your help.

This may be related to Infuse’s read-ahead cache which makes use of device storage to as part of its playback cache.

If you would prefer to disable this, you can set the ‘Streaming Cache’ option found in Infuse > Settings > Playback to ‘Memory Only’.

Many thanks for the feedback James. Unfortunately the caching changes suggested haven’t resolved the issues seen on the reverse proxy.

As I’m using Infuse on my local LAN, is there a way to disable caching altogether and just stream directly from Jellyfin like a Browser would?

Thanks for your support.

I’m not familiar with this software, but if it helps, I use Emby server in direct mode from a MacOS server on my LAN, and Infuse never writes anything to the server’s drives. Correct me if I’m wrong James, but Infuse’s caching only occurs on the device you’re watching on, not on the device the files are stored on? In which case it sounds like a problem with NPM, that is for some reason caching files as they’re being requested by Inufse?

Correct. Infuse itself will not write any data to the source disk (you can even disable write access if you like) but if there is some process in place that caches data on the (server) disk that is being requested by Infuse then that may explain the write activity you are seeing.

Makes sense, but to be clear I’m not suggesting Infuse is writing to NPM. NPM is writing tons of data to its local disk during the stream, but only with Infuse. This does not happen with other Jellyfin clients.

I guess the real question is Infuse method of starting a stream different here to trigger NPM to go nuts with its local disk writes knowing this doesn’t occur with other Jellyfin clients.

Just to put this to bed, I’ve found the cause and the fix for this. When using Infuse to stream from JellyFin through Nginx Proxy Manager (Nginx based reverse proxy), the following needs to be added as Advanced Config to the Proxy Host configuration you have created for JellyFin:

proxy_buffering off;
client_max_body_size 0;
sendfile on;

Without these settings, Infuse seems to trigger NPM in its default state to aggressively cache / buffer locally the entire file from Jellyfin. Other Jellyfin clients do not seem to trigger this behaviour…but this is how to disable that behaviour in NPM when using Infuse with JellyFin.

2 Likes

Thanks for following up!

Hopefully this will be helpful to others with similar setups.