From c686b2c1ea751aee7c80f695321f1f11ecb1da4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Thu, 6 Apr 2023 10:03:00 +0100 Subject: [PATCH] Increase narinfo size limit to 1MiB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I was still encountering failures due to narinfo files being too large, even with the increased 64kiB limit. This commit increases it to 1MiB which is hopefully larger than any “reasonable” derivation, while also not being too large for the server to keep in memory at once. --- server/src/api/v1/upload_path.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/api/v1/upload_path.rs b/server/src/api/v1/upload_path.rs index 41f3a50..ba00b25 100644 --- a/server/src/api/v1/upload_path.rs +++ b/server/src/api/v1/upload_path.rs @@ -55,7 +55,9 @@ use crate::database::{AtticDatabase, ChunkGuard, NarGuard}; const CONCURRENT_CHUNK_UPLOADS: usize = 10; /// The maximum size of the upload info JSON. -const MAX_NAR_INFO_SIZE: usize = 64 * 1024; // 64 KiB +/// +/// TODO: Make this configurable +const MAX_NAR_INFO_SIZE: usize = 1 * 1024 * 1024; // 1 MiB type CompressorFn = Box Box + Send>;