From 8aa83e3019363b086ab500e906ccfb0d06559527 Mon Sep 17 00:00:00 2001 From: Eric Mc Sween <5454374+emcsween@users.noreply.github.com> Date: Wed, 9 Jul 2025 08:09:47 -0400 Subject: [PATCH] Merge pull request #26915 from overleaf/em-jd-increase-max-request-size Increase web's max JSON request size to 12 MB GitOrigin-RevId: 91da31e14570e770553049d8376ae1686eba3336 --- services/web/config/settings.defaults.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/services/web/config/settings.defaults.js b/services/web/config/settings.defaults.js index 6edb19e6df..a324330bbd 100644 --- a/services/web/config/settings.defaults.js +++ b/services/web/config/settings.defaults.js @@ -710,12 +710,13 @@ module.exports = { // - the doc content // - text ranges spanning the whole doc // - // There's also overhead required for the JSON encoding and the UTF-8 encoding, - // theoretically up to 3 times the max doc length. On the other hand, we don't - // want to block the event loop with JSON parsing, so we try to find a - // practical compromise. + // There's also overhead required for the JSON encoding and the UTF-8 + // encoding, theoretically up to 6 times the max doc length (e.g. a document + // entirely filled with "\u0011" characters). On the other hand, we don't want + // to block the event loop with JSON parsing, so we try to find a practical + // compromise. max_json_request_size: - parseInt(process.env.MAX_JSON_REQUEST_SIZE) || 6 * 1024 * 1024, // 6 MB + parseInt(process.env.MAX_JSON_REQUEST_SIZE) || 12 * 1024 * 1024, // 12 MB // Internal configs // ----------------