elastic / elastic/elastic-agent

elastic-agent diagnostics collect --pprof can fail if the collected profile exceeds the gRPC message size limit

Open
#722 0 comments 0 reactions 0 assignees View on GitHub
bug Team:Elastic-Agent-Control-Plane
Dominant language
Go
Stars
275
Forks
264
Avg merge
1d 20h
Merged PRs (30d)
298

Description

This was originally encountered in by a support engineer helping a user:

```
./elastic-agent diagnostics collect --pprof
Failed to gather pprof data from elastic-agent: rpc error: code = ResourceExhausted desc = grpc: received message larger than max (5855561 vs. 4194304)
Created diagnostics archive "elastic-agent-diagnostics-2022-07-13T07-08-08Z-00.zip"
***** WARNING *****
Created archive may contain plain text credentials.
Ensure that files in archive are redacted before sharing.
```

The default message size in gRPC in 4 MB which can be changed with https://pkg.go.dev/google.golang.org/grpc#MaxRecvMsgSize

A better solution is likely to chunk the profiles so they are guaranteed to stay under the configured message size limit.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.