Code Monkey home page Code Monkey logo

Comments (2)

simukappu avatar simukappu commented on June 21, 2024

Putting json format records to kinesis, it runs for some time and then start producing warning for retry.
No idea what's going wrong behind the scene.

This warning message means that PutRecords API of Kinesis Data Streams or PutRecordBatch API of Kinesis Data Firehose returned failed records because of some kind of error, such as ProvisionedThroughputExceeded.

Gem code:

def batch_request_with_retry(batch, retry_count=0, backoff: nil, &block)
backoff ||= Backoff.new
res = yield(batch)
if failed_count(res) > 0
failed_records = collect_failed_records(batch, res)
if retry_count < @retries_on_batch_request
backoff.reset if @reset_backoff_if_success and any_records_shipped?(res)
wait_second = backoff.next
msg = 'Retrying to request batch. Retry count: %3d, Retry records: %3d, Wait seconds %3.2f' % [retry_count+1, failed_records.size, wait_second]
log.warn(truncate msg)
# TODO: sleep() doesn't wait the given seconds sometime.
# The root cause is unknown so far, so I'd like to add debug print only. It should be fixed in the future.
log.debug("#{Thread.current.object_id} sleep start")
sleep(wait_second)
log.debug("#{Thread.current.object_id} sleep finish")
batch_request_with_retry(retry_records(failed_records), retry_count+1, backoff: backoff, &block)
else
give_up_retries(failed_records)
end
end
end

Kinesis API reference:
https://docs.aws.amazon.com/kinesis/latest/APIReference/API_PutRecords.html
https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html

Can you check your cloud side metrics by CloudWatch?

Also wondering can we do firehose put directly with aggregated records

Currently, we cannot put aggregated records directly into firehose. Appreciate your feedback. See also this issue #193.

from aws-fluent-plugin-kinesis.

simukappu avatar simukappu commented on June 21, 2024

Closing this issue for now. Please reopen if required.

from aws-fluent-plugin-kinesis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.