Welcome! Log In Create A New Profile

Advanced

Preferred method to reopen the log with logrotate

June 01, 2022 11:08AM
Hello,

there seem to be two methods to tell nginx to re-open the log file after the file was rotated (we use logrotate).

1) nginx -s reopen

2) kill -USR1

Which is the preferred method, and why.

I am asking because we have seen nginx -s reopen failing because of a transient issue with the configuration. According to the man page reopen should be the same as SIGUSR1, but the error we saw implies that the config was reloaded (ie SIGHUP).

Version: nginx/1.19.9

Thanks…

Roger

_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

Preferred method to reopen the log with logrotate

roger_bc June 01, 2022 11:08AM

Re: Preferred method to reopen the log with logrotate

Maxim Dounin June 01, 2022 12:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 302
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready