Closed ajwans closed 11 years ago
Hi Andrew,
I updated the code with this change. I only add a case to solve the same problem when a worker die, add some tests and removed the changes on ngx_http_push_stream_register_worker_message_handler function, it isn't needed.
Thanks for your help.
Regards, Wandenberg
Each channel structure includes a list of workers to notify (workers_with_subscriptions) when new messages arrive for the channel, the exit of a worker does not remove it's entry from the subscriptions list. This means that a receiving worker copies a new message to a worker which no longer exists and the message is never processed.
If a new worker is occupying the slot where an old one was it will simply discard messages not intended for it. However, when no worker is on a slot for which messages arrive they simply accumulate and leak all our memory away.