-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Peertube log rotation does not release deleted files, inducing an infinite disk usage grow #6041
Comments
Thanks for the issue. Seems to be a winston bug: winstonjs/winston#2100 |
Make sense. 1 year, and no fix :/ |
For the record, i just noticed that on one of my instance, it seems that Peertube logs in different log files at the same time. Sorting log files by last modification date:
As you can see, files are not well ordered. Moreover, using lsof:
3 different files are still open. On this server, i use NodeJS v16 (it was v18 on the other instance). |
@Chocobozzz : FYI, it seems there is a fix that might help, and this fix is here with Peertube 6.0.x. I will let you know if it works (i have to wait a few hours/days to test). |
@Chocobozzz , it seems the bug we have is not exactly the same as the one in winstonjs/winston#2100 As discussed with a Winston maintainer, i opened a new issue: winstonjs/winston#2393 |
Describe the current behavior
Hi.
On one of my server, i saw a huge disk usage leak. See the /srv/ usage:
After some searching, I saw that there was a huge difference between
df
anddu
: df told there was 369G used storage, but du only found 215G.This kind of difference can be because of deleted files that are kept open by processes.
I then remembered that when my server is rebooted, i already saw that some space was released by peertube. I thought it was because of deleted temp files... Until today. I only restarted Peertube, and this happened:
More than 150G were released!
Unfortunately, i did not think to check which deleted files where opened before restarting...
I checked on another Peertube instance:
So i assume that it is the log rotation system who keeps open files after rotation.
Note: on the server where i freed 150G, the log level is debug, it is a pre-prod instance.
Steps to reproduce
Describe the expected behavior
No response
Additional information
The text was updated successfully, but these errors were encountered: