Skip to content
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

Logs more than 2 years before are included into current daily logs with huge sizes #189

Open
ukyanj0 opened this issue Apr 19, 2024 · 0 comments

Comments

@ukyanj0
Copy link

ukyanj0 commented Apr 19, 2024

Hello, last week our logrotate show too much CPU usage > 130% so we should have stopped using it.
It has worked fine for months with daily logging option, with less than 10MB size for a log.
The conf is
max_size 10M
retain 30
compress false
dateFormat YYYY-MM-DD_HH-mm-ss x
workerInterval 30
rotateInterval 0 0 * * *
rotateModule true

Analyzing error logs, I have found some odds that I want to ask the developers' opinions.

  1. PM2 logrotate started creating logs that include the oldest logs up to 2 years before, where the PM2 daemon starting working. The start time was around 4/15/24 16:31:02 as shown in the file name. (first photo)
  2. The first out.log size was created 4/15/24 16:31:02 with 3.6G that includes logs between 2022 Jan ~ 2023 Oct, then the second out.log was created 30 seconds later 4/15/24 16:31:32 with 3.4G that includes logs between 2022 Jan ~ 2023 Sep, which is shorter term than the first one. (second photo)
  3. Then for the next ones, it has the same pattern as 1) in 30 seconds 2), for shorter term, 3) therefore with 0.2G less size. (second photo)
  4. What I found weird was that in the head of monproxy-error__2024-04-15_16-31-02.log file, that is one of very first error files, I could read the "Cannot set property 'time' of null" error, which had tried to set the time of system info. There I guess they might have failed to read the process/server system info, then they failed to set the time of the system info that might end up being bugs of logrotate. (last two photos)

Thank you in advance

logrotate1
logrotate2
logrotate6
logrotate7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant