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

Infinite retries on 413 http error #320

Open
pschucker opened this issue May 24, 2024 · 1 comment
Open

Infinite retries on 413 http error #320

pschucker opened this issue May 24, 2024 · 1 comment

Comments

@pschucker
Copy link

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.

@workato-integration
Copy link

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

1 participant