[PATCH] Cache: gracefully exit the cache manager process

Maxim Dounin mdounin at mdounin.ru
Tue Nov 5 00:06:05 UTC 2013


Hello!

On Mon, Nov 04, 2013 at 02:07:23PM -0800, Yichun Zhang (agentzh) wrote:

> Hello!
> 
> On Mon, Nov 4, 2013 at 1:31 PM, Maxim Dounin wrote:
> >
> > The cache manager process isn't worker process, so calling
> > ngx_worker_process_exit() looks strange.
> >
> 
> But ngx_cache_manager_process_cycle() is already calling
> ngx_worker_process_init().

Yes, and this is known to cause problems.  E.g., more than one 
module was broken due to init_process callback being called in 
cache manager/loader processes which are quite different from 
worker processes.

> Are you suggesting removing this call as well?

No, but it is something we may consider.

In any case, I don't think that adding calls to worker-related 
stuff is a good idea, at least without a thoughtful analysis of 
possible side effects.

-- 
Maxim Dounin
http://nginx.org/en/donation.html



More information about the nginx-devel mailing list