-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Filebeat holds open deleted file descriptions with close_removed #2608
Labels
Filebeat
Filebeat
Comments
@blinken Thanks for the detailed report. Could it be that you hit this issue here? #2541 Could you check if you still see it with the most recent snapshot? https://beats-nightlies.s3.amazonaws.com/index.html?prefix=filebeat/ |
Looking much better after a few minutes here on the snapshot. Before -
Filebeat 6.0.0-alpha1-SNAPSHOT -
|
This was referenced Feb 1, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
The latest filebeat alpha seems to hold on to deleted file descriptors even with the config option close_removed: true. This eventually exhausts all available disk space. We typically see this when filebeat can't insert events into its output redis queue.
I think the issue here is partly of our own creation:
ERR Failed to RPUSH to redis list (OOM command not allowed when used memory > 'maxmemory'.) with %!v(MISSING)
in the filebeat logs). In this scenario, I'd expect filebeat to start dropping events in files that get rotated away, but it seems that it just holds on to file descriptors - which eventually causes the source machine to run out of disk space.Basically, we're doing bad things. But I'd expect filebeat to behave nicely in this case and close deleted file descriptors (drop events) if it can't upload anything - rather than causing the source machine to run out of disk space.
Rerunning
lsof -n -p 99804 | tail -n20| grep '/var/log/service_5/@4000000057e2425708aa44f4.u'
more than 5 seconds later shows the same file - ie. it's not being closed by close_inactive.The relevant stanza from my filebeat.yml -
Key info:
The text was updated successfully, but these errors were encountered: