From 8ad3e46ae011560356cdbdeaf1793062d69169f3 Mon Sep 17 00:00:00 2001 From: Kato Hiroki Date: Sun, 12 Oct 2025 12:17:51 +0000 Subject: [PATCH 1/2] chore: Increase function memory to 3008MB (#2687) --- vercel.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vercel.json b/vercel.json index 45c873bf5..96993dcbb 100644 --- a/vercel.json +++ b/vercel.json @@ -1,5 +1,12 @@ { "git": { "deploymentEnabled": false - } + }, + "functions": { + ".svelte-kit/**/*.js": { + "memory": 3008, + "maxDuration": 30 + } + }, + "regions": ["hnd1"] } From d392e5e88250c2347b66d8d6e09fd9b86d203238 Mon Sep 17 00:00:00 2001 From: Kato Hiroki Date: Sun, 12 Oct 2025 12:40:28 +0000 Subject: [PATCH 2/2] fix: Configure function memory via adapter (#2687) --- svelte.config.js | 9 +++++---- vercel.json | 9 +-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/svelte.config.js b/svelte.config.js index 5d7bf05ac..f6ba81c3c 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -9,12 +9,13 @@ const config = { preprocess: vitePreprocess(), kit: { - // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. - // If your environment is not supported or you settled on a specific environment, switch out the adapter. - // See https://kit.svelte.dev/docs/adapters for more information about adapters. + // See: + // https://svelte.dev/docs/kit/adapter-vercel adapter: adapter({ - // See: https://vercel.com/docs/edge-network/regions + runtime: 'nodejs22.x', regions: ['hnd1'], // Tokyo, Japan. + memory: 3008, // To avoid OOM errors on /workbooks/{slug} + maxDuration: 30, }), // See: // https://kit.svelte.dev/docs/configuration#alias diff --git a/vercel.json b/vercel.json index 96993dcbb..45c873bf5 100644 --- a/vercel.json +++ b/vercel.json @@ -1,12 +1,5 @@ { "git": { "deploymentEnabled": false - }, - "functions": { - ".svelte-kit/**/*.js": { - "memory": 3008, - "maxDuration": 30 - } - }, - "regions": ["hnd1"] + } }