[Pkg-nginx-maintainers] Bug#1033073: libnginx-mod-rtmp: clients hang trying to play published streams due to Debian default nginx configuration

Mark Nipper nipsy at bitgnome.net
Thu Mar 16 17:12:32 GMT 2023


Package: libnginx-mod-rtmp
Version: 1:1.2.2+dfsg-3
Severity: important
Tags: upstream

	I've already opened an issue for this upstream at:
---
https://github.com/arut/nginx-rtmp-module/issues/1719

But to summarize my findings here, the Debian stock nginx
configuration uses:
---
worker_processes auto;

which seems to break things a bit for this module.  The default
value for that setting upstream is 1.  If I use 1 instead of
auto, then everything works fine.  If I leave it as auto or any
number other than 1, then I run into the issue where clients
trying to play a currently published stream hang indefinitely
after successfully opening the TCP connection to this RTMP module
on 1935.  Setting that option to 1 can massively decrease
performance though on massively multicore systems of today.

	Thanks to the Open Streaming Platform folks though, I
found that I can keep worker_processes configured as anything
other than 1, thereby maintaining the potential performance
gains, by also uncommenting multi_accept in the events block,
which is commented out by default in Debian and also enabling the
top level rtmp_auto_push option for this module:
---
events {
	worker_connections 768;
	multi_accept on;
}

rtmp_auto_push on;
---

This gives me a working configuration with no client hangs
observed.

	Assuming I'm not completely wrong about all of this, it's
probably worth mentioning in a README or some such in
/usr/share/doc at the very least as otherwise, people might have
a bad experience trying to make this module work consistently.

	Thanks!

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (700, 'testing'), (600, 'unstable'), (500, 'testing-security'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-6-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libnginx-mod-rtmp depends on:
ii  libc6                       2.36-8
ii  nginx [nginx-abi-1.22.1-7]  1.22.1-9

Versions of packages libnginx-mod-rtmp recommends:
ii  nginx  1.22.1-9

libnginx-mod-rtmp suggests no packages.

-- no debconf information

-- 
Mark Nipper



More information about the Pkg-nginx-maintainers mailing list