From bbfa353663257742be5181fc8055855673f56dd9 Mon Sep 17 00:00:00 2001 From: Christoph Sieber Date: Fri, 25 Mar 2022 16:09:57 +0100 Subject: [PATCH] nginx: add timeout configurations for rtmp i hope this will fix the "stuck" streams when the client disconnects due to a network error and it can't reconnect for several minutes as the server still considers the stream as active --- config/nginx-rtmp/nginx.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/nginx-rtmp/nginx.conf b/config/nginx-rtmp/nginx.conf index 2d55729..99b84ab 100644 --- a/config/nginx-rtmp/nginx.conf +++ b/config/nginx-rtmp/nginx.conf @@ -53,6 +53,10 @@ http { rtmp { access_log /dev/stdout; + + # this should fix the hangs when the stream dies + drop_idle_publisher 15s; + timeout 15s; server { listen 1935; chunk_size 4096;