-
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 message overflow logic incorrect #1849
Comments
Hi @amread / @repeatedly |
@TheCoderGuyVlad If you don't have a problem, set larger chunk_limit_size is better. |
If you know the largest message size, you can adjust the You want to choose values for these such that when a chunk is one byte less than the threshold if a max sized message comes next it will not overflow the buffer. |
Thanks @repeatedly and @amread for your inputs! Appreciate it! |
Ran into this issue and @amread 's suggestion worked for us. Can we call this out in the fluentd docs till it is resolved? Took us a while to figure out that fluentd was dropping messages in our data pipeline. |
We're having the same issue while using the fluent-plugin-kafka input group. Is this something that will be addressed at some point? |
I'm experiencing the same issue...
|
I see this
with the following configuration
and 75262 < 300K. From the above, it also depends on how full the chunk is when the 75262 come in, correct ? When using the |
Seeing the above on fluentd 1.14. |
I also encountered this problem. In my case, I am using Amazon kinesis. So, I wanted to keep the
fluentd/lib/fluent/plugin/buffer.rb Lines 770 to 785 in 5126eba
If chunk size exceeds I was able to reproduce this with the following settings.
You will get the following error and nothing in the buffer.
|
Thank you for responding ! |
Check CONTRIBUTING guideline first and here is the list to help us investigate the problem.
I have a use case that allows for very log messages. While load testing using 2m buffers, I noticed that if I try to quickly jam these messages through back-to-back, the system will complain:
Looking at the code, I see the test for a single record overflowing the current chunk in
write_step_by_step
:Since
original_bytesize
is set outside of the inner loop, it does not detect if the current split is the first chunk. The fix to this is straightforward enough, but the retry logic isn't clever enough to do something different the next time.Ideally, we would know ahead of time that the message would overflow the buffer and just not write it. I imagine the code does not take the approach for the sake of efficiency. It would be nice if there was something like the
commit
androllback
functionality for use while constructing the chunk, perhapsmark()
andrewindToMark()
functions, or maybe even restructureappend
andconcat
to take blocks and allow for rewinding on failure.I took a stab at some minimal change, but found that I don't have a full appreciation for the nuance of this function's existing behavior, given the various assertions that failed in my attempts to fix this bug. It does seem that the underlying assumption of the current code is that records are small in comparison to the buffer so that the
chunk_full_threshold
will always be crossed while filling a chunk. I can probably work around this issue by either increasing my buffer size, or changing thechunk_full_threshold
.Here is a test that shows the problem adding one message that fills half the buffer, and then another that goes one byte over (added to 'with configuration for test with lower limits` sub_test_case):
Commit with new test: amread@d0653aa
The text was updated successfully, but these errors were encountered: