Serverless Functions timeout: set it in the Vercel functions as the conditional was not working. Fix (again) #468

This commit is contained in:
Enrico Ros
2024-03-28 23:12:25 -07:00
parent 70686502b4
commit 999f6de45f
2 changed files with 10 additions and 2 deletions
+3 -2
View File
@@ -16,7 +16,8 @@ const handlerNodeRoutes = (req: Request) =>
});
export const runtime = 'nodejs';
// noinspection JSUnusedGlobalSymbols
export const maxDuration = 25; // the Browsing module has a timeout of ~10s, so we increase 15 (default) -> 25
// NOTE: the following statement breaks the build on non-pro deployments, and conditionals don't work either
// so we resorted to raising the timeout from 10s to 25s in the vercel.json file instead
// export const maxDuration = 25;
export const dynamic = 'force-dynamic';
export { handlerNodeRoutes as GET, handlerNodeRoutes as POST };
+7
View File
@@ -0,0 +1,7 @@
{
"functions": {
"app/api/trpc-node/**/*": {
"maxDuration": 25
}
}
}