Closed ghost closed 8 years ago
Hi @theairkit
according with your description seems that during the reload process (HUP) at least one of the nginx workers failed to clean the references to it on the shared memory, and this could be caused by any of the modules you are using. All workers must exit with "0" after the HUP signal to keep things working properly.
Try to enable the debug to generate coredumps and be possible to check which module is causing the worker dies incorrectly.
Answering your questions:
@wandenberg thanks for answer and explanation!
So, seems i've found the reason of this behavior: an old-old cron, killing nginx workers in 'shutdown' state more than 30 seconds...
Right now i disable it.
Sorry for this 'false' issue, and thanks again!
@wandenberg: Actually, problem is little bit complex. We have fast release cycle and it's common case to reload nginx dozens of times per day. With that frequent reloads workers in shutdown state (which are serving slow clients) keep accumulating through the day, and we urge to forcefully kill them.
So, we caught between the devil and the deep blue sea: (a) either have slow workers hanging around; (b) or have memory leaks due breaking cleanup routines of push-stream-module because of improper killing of workers.
I guess, it will be nice to be able to manually cleanup trashed messages?
@seletskiy as I said before, change the cleanup routines behavior can case undesired and unknown side effects and should be done very carefully.
Which value did you set for push_stream_subscriber_connection_ttl ? The default value is "never" letting the connections live forever. Try to set some value compatible with your reload frequency, lets say 15 minutes. With that all subscribers will be disconnected after that time and your worker will be able to complete the reload process in at most that time, no matter if is a slow client or not.
Just for curiosity, do you really need to reload a nginx used for a data streaming with that frequency? Reloads are necessary only when the configuration has changed. I would suggest to split up your setup in two services, one for streaming and one for the configuration that needs to be reloaded frequently, if possible.
Hi I using your module with following configuration:
It works well, but sometimes (not in 100% cases), after sending HUP signal to the nginx, trash stops cleaning. Trash queue grows up to allowed memory in configuration directive, after that I see messages:
My assumption is that in some cases trash can't be cleared
As a temprorary fix, I wrote next patch (force clear):
So, my questions:
Thanks in advance!