From 39df5bdfa6858efe11fe5a66473fb56aea9aa27a Mon Sep 17 00:00:00 2001 From: Shane McGovern Date: Sun, 16 Aug 2026 03:31:36 +0100 Subject: [PATCH] Raise postLog body ceiling to 512 KiB A diagnostic ring (boot evidence + recent lines + status) routinely exceeds 64 KiB on a long session: a 651-line evidence ring measured ~90 KB and was rejected with "log body too large" (mod.postLog returned nil and the send was dropped). The transport stages the body to a file and streams it via curl, so the ceiling is a budget, not a memory spike. 512 KiB is generous for real support logs while staying far under the 5 MiB the reference loghook endpoint accepts. --- src/mods/Net.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/mods/Net.lua b/src/mods/Net.lua index c54f0a68..7cf67c84 100644 --- a/src/mods/Net.lua +++ b/src/mods/Net.lua @@ -32,9 +32,14 @@ local Net = {} Net.MAX_INFLIGHT = 4 -- Clamp on the caller's timeout, so a mod cannot pin a worker indefinitely. Net.MAX_SECONDS = 30 --- A log body ceiling. Debug logs are kilobytes, and a server operator has no --- reason to accept a mod uploading arbitrary megabytes to its endpoint. -Net.MAX_BODY = 65536 +-- A log body ceiling. A diagnostic ring (boot evidence + recent lines + +-- status) routinely exceeds 64 KiB on a long session, so the ceiling is +-- 512 KiB: generous for real support logs, still far under the 5 MiB the +-- reference loghook endpoint accepts, and small enough that a misbehaving +-- mod cannot upload arbitrary megabytes. The body is staged to a file and +-- streamed by the transport, so the ceiling is a budget, not a memory +-- spike; callers that stay under it never notice it. +Net.MAX_BODY = 512 * 1024 local function fetch() return require("src.net.Fetch")