Export Vercel Functions config on @solidjs/start@0.5.9
Hello ! I've managed to update my
0.3.0 project to 0.5.9 by scooping info here and there on the Github commits & issues.
However I'm having an issue with API routes when they are deployed on Vercel Functions.
I've got API routes that trigger a long call that builds a PDF on the node server.
- test-export: bare bones export that creates a 256px image and exports it as a PDF using jsPDF
- high-res-export: complex export that assembles large pages and exports them as a PDF using jsPDF
Local Dev : everything works fine, the test-export and high-res-export work
Vercel Deployment : the test-export works, but the high-res-export times out at 15 sec (FUNCTION_INVOCATION_TIMEOUT), the default timeout for a Pro subscription
The thing is, I can't find a way to bump the maxDuration setting of my API routes on Vercel
https://vercel.com/docs/functions/configuring-functions/duration
- Exporting a config object or a maxDuration variable doesn't work (it is ignored by Vercel as far as I can see)
- Configuring a vercel.json file doesn't work because the API routes are not defined in a api/ folder at the root of the project. The Vercel build fails with :
Configuring Maximum Duration for Vercel Functions
Learn how to set the maximum duration of a Vercel Function.
0 Replies