[nginx] two masters exist

洪志道 hongzhidao at gmail.com
Thu Mar 2 16:06:31 UTC 2017


Hi!

It's possible that two masters exist at the same time.

kill -USR2 pid;
sleep(2);
if [ -f ${oldbinpidfile} -a -f ${pidfile} ];
  # New master doesn't success in two seconds
  kill -QUIT oldpid;
fi

We assume that the previous exist master is old,
I want to know which master process the request that's accepted,
maybe I can design the variable $master with value old or new.
Is it possible to implement?

Thanks!
B.R.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20170303/cfc0ba95/attachment.html>


More information about the nginx-devel mailing list