RTMP with multiple worker processes and rtmp_auto_push

Carey Gister careygister at outlook.com
Tue Aug 6 00:50:42 UTC 2019

Hi Hucc,

No, that did not work. Are you missing something from your patch?

I implemented your patch, ran two workers and set rtmp_auto_push on. The results were actually worse: my server did not send data to my one connected test client.

Carey Gister

From: nginx-devel <nginx-devel-bounces at nginx.org> on behalf of 胡聪 (hucc) <hucong.c at foxmail.com>
Sent: Monday, August 5, 2019 04:46
To: nginx-devel <nginx-devel at nginx.org>
Subject: Re: RTMP with multiple worker processes and rtmp_auto_push

On Friday, July 26, 2019 11:08, Carey Gister wrote:

>I hope someone can help illuminate some background information related to this
>module. I understand that the rtmp_auto_push directive worked with multiple
>workers through nginx 1.7.x and then something changed in the nginx internals
>and it stopped working and was no longer supported for multiple workers.
>Can someone provide background on what changed that had this feature stop
>working? My manager has tasked me with getting this feature to work, if possible.
>Carey Gister

The following patch may solve your problem.

diff --git a/ngx_rtmp_auto_push_module.c b/ngx_rtmp_auto_push_module.c
index 60c85d7..436b176 100644
--- a/ngx_rtmp_auto_push_module.c
+++ b/ngx_rtmp_auto_push_module.c
@@ -140,6 +140,8 @@ ngx_rtmp_auto_push_init_process(ngx_cycle_t *cycle)
         return NGX_OK;

+    ngx_rtmp_auto_push_module.ctx_index = 0;
     apcf = (ngx_rtmp_auto_push_conf_t *) ngx_get_conf(cycle->conf_ctx,
     if (apcf->auto_push == 0) {
nginx-devel mailing list
nginx-devel at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20190806/9cf5a51c/attachment.html>

More information about the nginx-devel mailing list