Closed lzap closed 2 years ago
Observation: The customer uses logrotate to send the signal with "compress" option, it is possible that the file is compressed and deleted while it is still copying. I asked them to use "delaycompress" logrotate feature which delays compression of rotated files by one cycle (one day in this case). This should give a lot of time to finish copying.
Which process is rolling the log files in this situation? Is logrotate
being used to roll the log files and then signal the ruby process to re-open the files? Or is the logging gem itself configured to perform the log file rotation?
If you could include the logroate
configuration and the Logging
gem configuration, that would be helpful.
Yeah, I don't remember how this ended up being resolved, but it's been fixed. Thanks!
Hey,
we have a report from a customer about some deleted and opened files left after SIG1 is used to trigger
Logger.reopen
.After reading the rolling mechanism, my conclusion is that reopen process is triggered during copy operation, that is during
FileUtils.concat
call. Or I cannot explain why would the library open a copy of a file. Do you have an idea how this could happen? Have you seen such a problem before? Thanks.