-
Notifications
You must be signed in to change notification settings - Fork 17
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
Some records failed while calling PutRecordBatch to Firehose stream, retrying. Individual error codes: ServiceUnavailableException #6
Comments
Max payload size for lambda is 6mb. boto3 has builtin support for retries checkout below doc: |
Hi There, |
We were able to increase firehose shards thru service limit increase with AWS support. Ref: https://docs.aws.amazon.com/firehose/latest/dev/limits.html |
Hi @LiamNewtonNHS we did implement a back off function which has seemed to solve the issue and also lowered the batch size.
We also lowered the batch sizes in the entry function as so:
|
Hi there,
Thanks for your work on putting this script together it's helping us hugely!
We are seeing an error (where we are processing 3-4000 records of various sizes) where we are presumably trying to send too much data to the Firehose (metrics seem to show it throttles on bytes per second limit being hit) and hitting the limits and doing that 20 times therefore the function is erroring out.
We see lots of "Some records failed while calling PutRecordBatch to Firehose stream, retrying. Individual error codes: ServiceUnavailableException," in the CLoudWatch logs for the function.
Sometimes it seems to get through eventually, but sometimes it hits the 20 retries limit and errors with:
"[ERROR] RuntimeError: Could not put records after 20 attempts. Individual error codes: ServiceUnavailableException"
Looking online it seems to general fix for such issues is to implement a back-off and retry process as per: https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html and https://docs.aws.amazon.com/general/latest/gr/api-retries.html.
I was planning on implementing this into your code, but before doing so wondered if there was an easier fix you knew of?
Thanks in advance
The text was updated successfully, but these errors were encountered: