Increase narinfo size limit to 1MiB

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.
This commit is contained in:
Charlotte 🦝 Delenk 2023-04-06 10:03:00 +01:00
parent efa15b9788
commit c686b2c1ea
No known key found for this signature in database
GPG key ID: AB2BD8DAF2E37122

View file

@ -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<C> = Box<dyn FnOnce(C) -> Box<dyn AsyncRead + Unpin + Send> + Send>;