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

Cannot write large log messages to CloudWatch #28

Open
4z3 opened this issue Feb 27, 2018 · 3 comments
Open

Cannot write large log messages to CloudWatch #28

4z3 opened this issue Feb 27, 2018 · 3 comments

Comments

@4z3
Copy link
Contributor

4z3 commented Feb 27, 2018

When there are large log messages in the journal, then journald-cloudwatch-logs aborts with following error:

Failed to write to cloudwatch: failed to put events: InvalidParameterException: Log event too large: 383595 bytes exceeds limit of 262144
         status code: 400, request id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

It would be nice if instead large messages get forwarded as multiple chunks. Edit: Not crashing would be enough already, no need for nice-to-haves :)

@whereisaaron
Copy link

This is a CloudWatch Limit of 256 KB per event. So you have to choose between logging duplicate events for the chunks, or truncating, or (current behavior) not logging at all. I'd suggest calculating the size as per the AWS docs, and truncating if it is too big for a single event.

@4z3
Copy link
Contributor Author

4z3 commented Feb 28, 2018

Yeah, I get that this is an AWS limit. The issue is that journald-cloudwatch-logs aborts/crashes when it fails to send a large log message. It would be already sufficient to not crash (no need for chunking/truncating). I've updated the issue description accordingly.

@whereisaaron
Copy link

Agreed! Not crashing would be a good improvement 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants