Add limits.max_agent_doc_size config#7135
Conversation
Add a new config option that applies to checkin request bodies after decompression. This is intended to prevent a compressed request from leading to an OOM on decompression.
TL;DRThe Remediation
Investigation detailsRoot CauseNot conclusive from available data. The pre-fetched step log ends with package-level failure only:
Related execution paths:
Evidence
Verification
Follow-upOnce the first failing line is available, I can map it to the exact source/test and provide a concrete code-level fix. Note 🔒 Integrity filter blocked 2 itemsThe following items were blocked because they don't meet the GitHub integrity level.
To allow these resources, lower tools:
github:
min-integrity: approved # merged | approved | unapproved | noneWhat is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
* Add limits.max_agent_doc_size config Add a new config option that applies to checkin request bodies after decompression. This is intended to prevent a compressed request from leading to an OOM on decompression. * Change to using a MaxBodyDecompressed limit per endpoint * cleanup * Apply suggestions from code review --------- (cherry picked from commit 44083ae) Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com> Co-authored-by: Shaunak Kashyap <ycombinator@gmail.com>
What is the problem this PR solves?
Prevent fleet-server from going OOM when a compressed checkin request size explodes on decompression.
How does this PR solve the problem?
Add a new config option called limits.max_agent_doc_size that defaults to 20mb. This limit is applied to the gzip.Reader for compressed requests.
Design Checklist
I have ensured my design is stateless and will work when multiple fleet-server instances are behind a load balancer.I have or intend to scale test my changes, ensuring it will work reliably with 100K+ agents connected.Checklist
./changelog/fragmentsusing the changelog tool