Is there any other way to trigger log reopen beside kill -USR1?

Liu Haifeng haifeng.813 at gmail.com
Fri Jan 25 10:23:56 UTC 2013


I did a test, seams cool, thank you all.

On Jan 25, 2013, at 1:48 AM, Andre Jaenisch <andrejaenisch at googlemail.com> wrote:

> 2013/1/24 Scott Ribe <scott_ribe at elevated-dev.com>:
>> I think the suggestion about the symlink was to make sure that if/when nginx re-opens the file, it's actually opening the file you want it to--an alternative approach to what you're doing, which does not care when the file is re-opened.
> 
> Exactly. There's only one file to be opened (this one, which the
> symlink points to) and thus less danger of race conditions.
> 
> 2013/1/24 Jan-Philip Gehrcke <jgehrcke at googlemail.com>:
>> Maybe I did not read carefully enough, but instead of relying on the $(date "+%Y%m%d") in the exact moment of renaming the file, you could use the last modification time of the file via. e.g.
>> 
>> $ stat -c %y ~/.bashrc | awk '{print $1}'
>> 2012-12-18
> 
> My version has no dashes :)
> And you could adjust the modification to not take place at midnight,
> couldn't you?
> 
> Regards, André
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list