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

Add messageSizeLargerErrFmt error to errors catalog #2432

Closed
pracucci opened this issue Jul 15, 2022 · 0 comments · Fixed by #2470
Closed

Add messageSizeLargerErrFmt error to errors catalog #2432

pracucci opened this issue Jul 15, 2022 · 0 comments · Fixed by #2470
Assignees
Labels

Comments

@pracucci
Copy link
Collaborator

pracucci commented Jul 15, 2022

The messageSizeLargerErrFmt error should be added to the errors catalog. This error is returned when the incoming push request size is bigger than the allowed limit:

mimir/pkg/util/http.go

Lines 175 to 183 in 065f6d6

func decompressRequest(dst []byte, reader io.Reader, expectedSize, maxSize int, compression CompressionType, sp opentracing.Span) (body []byte, err error) {
defer func() {
if err != nil && len(body) > maxSize {
err = fmt.Errorf(messageSizeLargerErrFmt, len(body), maxSize)
}
}()
if expectedSize > maxSize {
return nil, fmt.Errorf(messageSizeLargerErrFmt, expectedSize, maxSize)
}

The related config option to control the limit is defined here:

f.IntVar(&cfg.MaxRecvMsgSize, "distributor.max-recv-msg-size", 100<<20, "remote_write API max receive message size (bytes).")

We should take the opportunity to improve the config option description too.

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

Successfully merging a pull request may close this issue.

2 participants