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
415-310-5304


________________________________
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:

>Hi,
>
>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.
>
>Thanks,
>
>Carey Gister
>415-310-5304

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,
                                                     ngx_rtmp_auto_push_module);
     if (apcf->auto_push == 0) {
_______________________________________________
nginx-devel mailing list
nginx-devel at nginx.org
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.nginx.org%2Fmailman%2Flistinfo%2Fnginx-devel&data=02%7C01%7C%7C991bf848d945422f176608d7199a89da%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637006023836677306&sdata=iP7Iu6r0igRQ00L1P3X9fN%2FYU7YKPBaE61kQghGdDrs%3D&reserved=0
-------------- 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