Skip to content

Infinite retries on 413 http error #320

@pschucker

Description

@pschucker

According to new relic docs, a 413 http status code is send when The payload was too big. Payloads must be under 1MB (10^6 bytes).

Currently, BatchDataSender throws a RetryWithSplitException in case of this status code

case 413:
logger.warn(
"Response from New Relic ingest API. Retry {} with split recommended.: code: {}, body: {}",
batchType,
response.getCode(),
responseBody);
throw new RetryWithSplitException();

And the TelemtryClient reacts by retrying the request with a split batch

} catch (RetryWithSplitException e) {
splitAndSend(batchSender, batch, e);
} catch (ResponseException e) {

Problem: If the batch size = 1, this ends in an infinite loop.
Request should only be retried if batch can be split, so batch size > 1. Otherwise the payload is too big and there is no need for retrying.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions