sergey-dryabzhinsky/nginx-rtmp-module

Missing statistics data

Opened this issue · 2 comments

kn007 commented

worker_processes auto(4 core) with rtmp_auto_push on. No publishers, no clients. In bytes/out bytes is 0KB.

If change worker_processes to 1, working well. It seems that statistics cannot show the out bytes of hls stream.
I only have one app with using hls.

rtmp {
	server {
		...
		application stream {
			...
			deny play all;
			meta off;
			live on;
			record off;
			hls on;
			...
		}
	}
}

Any way to troubleshoot? Thx.

kn007 commented

OK, I found the problem.

Config:

server {
        listen 127.0.0.1:80;
        server_name 127.0.0.1;
        ...
        #location /rtmp_stat {
        #    rtmp_stat all;
        #    allow 127.0.0.1;
        #    deny all;
        #}
        ...
}
server {
        listen 443 ssl http2;
        server_name example.com;
        ...
        location /stat {
            rtmp_stat all;
            rtmp_stat_stylesheet stat.xsl;
        }
        ...
}

Then example.com/stat no data.

After remove comment content, it's working well.

It seems that Nginx with mutli workers cannot count the number of clients well.

Will out bytes statistics be added for hls?

Thanks

kn007 commented

Still have problem with statistics data, it seems that I was able to get statistics because I visited the corresponding worker.