Files
kong-k8s-platform/dataplane-template
Stéphane Tailland 86d56dc4ea Make the request body buffer a per-domain setting
ai-proxy's log_payloads and log_statistics produced nothing on the AI
gateway despite being enabled. The cause was not the plugin's own
max_request_body_size but nginx's client_body_buffer_size, left at its 8k
default: past it the body goes to a temp file, and
kong.request.get_raw_body() returns nil for a body on disk, so any plugin
reading the body silently stops working. Prompts on that gateway run to 30
KB. Measured, not guessed — request.size was 30369 on the last call.

Expose it as ${CLIENT_BODY_BUFFER_SIZE} with the 8k default every domain
keeps, rather than raising it globally. The buffer is allocated per
connection carrying a body, so a value that is free on a gateway seeing 18
requests a day is not free on one serving real traffic.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-27 16:41:33 +02:00
..
2026-08-19 17:34:06 +02:00