From 5ab0b85e52530e9e0f1d546d4049b326ec0fea79 Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Mon, 13 Nov 2023 12:37:26 -0300 Subject: [PATCH] chore: Reduce slots API serverless memory configuration (#12270) * chore: Reduce API serverless memory configuration * Only limit to slots for now * Moved the vercel.json file to root * More fun with vercel.json files * Trying new pattern * Using a pattern that matches the Vercel deployment summary function name * Trying to set the memory directly in the handler file * Trying it on all functions * Changed glob * Moved vercel.json file to root * Trying a new glob * Give me all functions * Trying just * for all functions * Trying again... * Putting the config on the defaultResponder * Seeing if web app takes setings * Changed .js to .ts * Changed root path * Added back vercel.json now that the path is changed * Reduced API slots memory to 512 * Removed unneeded code changes' * Update defaultResponder.ts --- apps/api/vercel.json | 7 +++++++ apps/web/vercel.json | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 apps/api/vercel.json diff --git a/apps/api/vercel.json b/apps/api/vercel.json new file mode 100644 index 0000000000..09d28d9434 --- /dev/null +++ b/apps/api/vercel.json @@ -0,0 +1,7 @@ +{ + "functions": { + "pages/api/slots/*.ts": { + "memory": 512 + } + } +} diff --git a/apps/web/vercel.json b/apps/web/vercel.json index 641f68e58b..6f4decb2ee 100644 --- a/apps/web/vercel.json +++ b/apps/web/vercel.json @@ -4,5 +4,13 @@ "path": "/api/cron/calendar-cache-cleanup", "schedule": "0 5 * * *" } - ] + ], + "functions": { + "pages/api/trpc/public/[trpc].ts": { + "memory": 768 + }, + "pages/api/trpc/slots/[trpc].ts": { + "memory": 768 + } + } }