main conf created twice, only closed once?

ben5192 nginx-forum at forum.nginx.org
Mon Mar 14 11:01:42 UTC 2016


Hi,
I have a problem with a module I'm writing. I need to do something in the
main config after variables are read from the conf file, so I have put this
in the post_conf function. Then I need do something when to it when the
process is closed via 
./nginx -s reload
this is in the exit_process function. What I would expect is that for each
reload there is one new main conf, this is not the case ( see output below
). Two new main configs are created, then only one of them is 'seen' by the
exit_process.

create main conf mainconf=0x9908e8
post conf mainconf=0x9908e8
--- reload happens
create main conf mainconf=0xe508e8
post conf mainconf=0xe508e8
create main conf mainconf=0x993ef8
post conf mainconf=0x993ef8
exit mainconf=0x9908e8

So on reload, two new main configs are created, and the previous one is
closed. This wouldn't be a problem, but every subsequent reload the same
thing happens ( two are created, but only one of the previous two exited).

Anyone have any idea why this might happen?

Thanks.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,265302,265302#msg-265302



More information about the nginx mailing list