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

FIX: Ensure closing log files on reload #2435

Merged
merged 3 commits into from
Dec 13, 2023

Conversation

kamil-certat
Copy link
Contributor

During the reloading process, log handlers are not explicitly closed. This may cause long living open file handlers and keeping cached files in the memory. If log files are big, the RAM cache usage can be very high.

During the reloading process, log handlers are not explicitly closed.
This may cause long living open file handlers and keeping cached files
in the memory. If log files are big, the RAM cache usage can be very
high.
@kamil-certat kamil-certat requested a review from sebix December 11, 2023 14:00
@kamil-certat
Copy link
Contributor Author

BTW: just to clearly justify, why it's needed:

On a long-running machine without the change:

$ lsof -u intelmq | grep /var/log | wc -l
1338

$ lsof -u intelmq | grep /var/log | grep deleted | wc -l
1129

More than 1000 of opened file descriptors to deleted log files, hold by IntelMQ.

On the machine with the change, there is not a single one.

@sebix sebix merged commit fd0baa0 into certtools:develop Dec 13, 2023
20 checks passed
@kamil-certat kamil-certat deleted the cleanup_log_files branch December 13, 2023 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants