arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.46k stars 3.52k forks source link

Stats Acting Really Odd #1393

Open whittinghamj opened 5 years ago

whittinghamj commented 5 years ago

So I have an NGINX using the latest RTMP module.

Stats Page: https://www.dropbox.com/s/bubumne1rokmsn3/Screenshot%202019-03-22%2004.12.52.png?dl=0

Shows 11 streams but there are actually 13 running streams as seen by the next screenshot.

https://www.dropbox.com/s/psa42yakilstzts/Screenshot%202019-03-22%2004.16.32.png?dl=0

The odd thing is, if i refresh the RTMP stats every now and again it will show 13, then it will show 0 then 5 ...... very odd indeed.

The important thing to keep in mind is the streams NEVER stop working. Even if they DO NOT show in the stats page, the streams are still running perfectly without fail.

So the 11 streams shown right now in the stats page but 13 are active and I'm watching one of the missing streams from the stats page right now so I know its active and working and the /mnt/hls storage folders show all 13 stream folders / contents.

Any ideas please?

This is really frustrating as I use the xml file for stats into a php script and this script reports streams as being offline when really then are not!!

Thanks in advance.

aspaseltiner commented 5 years ago

Probably related to these issues, assuming you are running multiple workers:

The worker that answers your stat request will only report on streams that the answering worker knows about. Also relevant: https://blog.cloudflare.com/the-sad-state-of-linux-socket-balancing/

See https://rarut.wordpress.com/2013/06/18/multi-worker-statistics-and-control-with-nginx-per-worker-listener-patch/.