From b2a2ecc315c5e740721ab1b990cfd6a24d30e9e4 Mon Sep 17 00:00:00 2001 From: Nerual Dreming Date: Mon, 16 Nov 2026 21:53:06 +0300 Subject: [PATCH] server: a request body may be 2 GiB cpp-httplib refuses a body over 100 MiB by default, so a recording longer than about four and a half minutes in 32-bit WAV (POST /transcribe, a VAE encode) was answered 413 Payload Too Large. An hour of 32-bit stereo at 48 kHz is 1.4 GB. --- tools/yue-server.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/yue-server.cpp b/tools/yue-server.cpp index 56ed439..d2969bb 100644 --- a/tools/yue-server.cpp +++ b/tools/yue-server.cpp @@ -803,6 +803,8 @@ int main(int argc, char ** argv) { httplib::Server svr; g_svr = &svr; + // a recording comes whole in one request body: an hour of 32-bit stereo at 48 kHz is 1.4 GB + svr.set_payload_max_length((size_t) 2 * 1024 * 1024 * 1024); // SO_REUSEADDR lets us rebind a port still in TIME_WAIT after a restart. // SO_REUSEPORT is deliberately not set: a second instance on the same port