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

OTLP/gRPC message size limit is fixed at 4MB #14759

Open
carsonip opened this issue Nov 28, 2024 · 3 comments
Open

OTLP/gRPC message size limit is fixed at 4MB #14759

carsonip opened this issue Nov 28, 2024 · 3 comments

Comments

@carsonip
Copy link
Member

carsonip commented Nov 28, 2024

If the decompressed grpc message exceeds 4MB, the collector sending to apm-server logs the following error.

2024-11-25T04:08:26.561Z error internal/queue_sender.go:100 Exporting failed. Dropping data. {"kind": "exporter", "data_type": "traces", "name": "otlp", "error": "not retryable error: Permanent error: rpc error: code = ResourceExhausted desc = grpc: received message after decompression larger than max (6624956 vs. 4194304)", "dropped_items": 11613}
go.opentelemetry.io/collector/exporter/exporterhelper/internal.NewQueueSender.func1
go.opentelemetry.io/collector/[email protected]/exporterhelper/internal/queue_sender.go:100

The limit comes from the default 4MB grpc server message size limit MaxRecvMsgSize in https://pkg.go.dev/google.golang.org/grpc#MaxRecvMsgSize .

Current user workarounds

  • if batchprocessor is used, adjust the config values to influence the payload size
  • use otlphttpexporter in place of otlpexporter in the collector sending to apm-server.

Proposed solution

apm-server should either document or adjust the limit, or make it configurable.

@inge4pres
Copy link
Contributor

Do you know if there's a corresponding config in OTel collectors?
Would it be sensible to mirror its name in apm-server?

@carsonip
Copy link
Member Author

carsonip commented Nov 28, 2024

Do you know if there's a corresponding config in OTel collectors?

max_recv_msg_size_mib in https://github.com/open-telemetry/opentelemetry-collector/blob/33264a5408cd918cfb45fd622b99f681c67d535c/config/configgrpc/configgrpc.go#L175

Would it be sensible to mirror its name in apm-server?

If we're adding a config, it needs to be nested under an appropriate section, as it only concerns OTLP/gRPC, not even OTLP/HTTP. We don't have any otel specific sections in apm-server.yml.

@axw
Copy link
Member

axw commented Nov 29, 2024

Maybe we should make it configurable, but IMO the better solution would be for clients to send smaller payloads. If the server can accept a larger payload, then it will be more susceptible to OOM.

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

No branches or pull requests

3 participants