-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Large Memory Consumption when ignore_same_log_interval #4174
Labels
bug
Something isn't working
Comments
Open
Thanks for your report! Lines 464 to 483 in 0a6d706
|
Wow, indeed. |
May also relate to #1657 |
I have created PR to fix this! Is it correct that this occurs only when using |
Yes correct. Thanks! |
daipom
changed the title
Large Memory Consumption
Large Memory Consumption when ignore_same_log_interval
Jul 6, 2023
I modified the title a bit! |
github-project-automation
bot
moved this from Work-In-Progress
to Done
in Fluentd Kanban
Jul 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
My colleague Lester Lu and I found the issue related to #3401
The abnormal increasing memory usage is because of the ignore repeated log feature.
The current implementation uses dictionary to store the message as key. However, depends on the plugin implementation, the message could be the actual log that being send out. For example in azure-loganalytics, the log message is like
log.fatal "Exception occured in posting to DataCollector API: " + "'#{ex}', data=>" + Yajl.dump(records)
. The records/log could be large like 1k bytes per log and never repeat.It leads to the dictionary
cached_log
keep growing and the memory will never be released, therefore can observe significant memory usage for some plugins.fluentd/lib/fluent/log.rb
Line 480 in 0a6d706
To Reproduce
Use plugin azure-loganalytics, config with an invalid account so that the log will not be send out, with large traffic 3k log/s, with ignore_same_log_interval 60s, observed memory usage keep increasing.
Expected behavior
Memory should not increase infinitely. The
cached_log
need to be freed once a while.Your Environment
Your Configuration
Your Error Log
Additional context
No response
The text was updated successfully, but these errors were encountered: