New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
copytruncate not empty the file #486
Comments
Did logrotate issue any errors on rotation ( |
@cgzones I am using the command |
@xiaomuyi Could you please run the command with |
@kdudka Command execution and console output.
The result of log file cutting is that some of the files can be cut properly and the situation. But then again some of the logs are cut but the cut files are not cleared. I don't know why this is happening? Is it because there are too many configuration files?
|
Could you please paste the output of |
|
There is no error in logrotate's output. I think the files are truncated properly but the service that creates the log files then continues writing to them at the original offset, which in turn restores the apparent size of the files. |
Since the application is not aware of file descriptor changes,
copytruncate
is used. for example, cutting the ssf-json.log file,the following problems were encountered in the process of using it:The logrotate version is 3.21.0, configuration file is as follows.
The text was updated successfully, but these errors were encountered: