-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
(v1.8.3) Built-in multiline parser (cri) failing to concatenate large logs #3938
Comments
Thanks for filing @Fullplate. Are you able to build a version with that hard coded version modified and see if that fixes the issue? If yes then I think the solution should be to add that as a configurable option for large log use cases |
@agup006 Thanks for the reply. I'll have a go at doing that and report back. |
@agup006 I confirmed that the "auto flush" function isn't an issue -- I disabled it completely and was still able to reproduce. Here is a minimal reproduction of the issue:
I was able to fix the issue by removing the extra flush however without understanding the rational behind this bit of code, I'm unsure this is safe to do. @edsiper would you be able to shed light on this? (sorry if pinging maintainers is a no-no, but I think you may be the best person to answer this one) |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
It would be great to get a response on this issue, even if it's just that the current implementation doesn't support this use case. Currently it's blocking our adoption of fluent-bit. |
@nokute78 can you take a look at this ? |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Notstale |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
This change seems to help to some degree - #6552 |
Sorry for missing issue. I read #3938 (comment) and it may be solved by #5564 . |
The above 2 changes do seem to make a significant improvement. It still happens occasionally but nowhere near as much as before. The remaining occurrences seem to be around the time of log file rotation. |
Behaviour:
Containerd uses the CRI log format. Logs on disk are limited to a max size of 16k per line, and therefore must be concatenated to produce the original log line.
Log lines up to around 200k in size are parsed and concatenated correctly.
Log lines around 300k+ in size are split into multiple logs (usually 2-4 depending on original log size).
My theory is that the parser's default flush timeout of 4 seconds is too short to capture all log lines once the total size is beyond a certain point. I'm not sure if reading new lines resets this timeout, but that seems like it would be the correct behaviour. It would also be nice if this value was configurable, from my reading of the code it seems to be hardcoded.
Environment: Kubernetes 1.20.7, containerd runtime
Config:
The text was updated successfully, but these errors were encountered: