Hi there!
I am hosting a Nest.js backend application on Vercel - for ease of deployment and to have everything in one place.
Some of my routes take more than 10s and therefore hit the maximum duration limit. I've tried increasing the limit as per the docs: https://vercel.com/docs/functions/configuring-functions/duration but it doesn't work out. I'm using a vercel.json configuration similar to this:
{ "version": 2, "builds": [ { "src": "src/main.ts", "use": "@vercel/node" } ], "routes": [ { "src": "/(.*)", "dest": "src/main.ts" } ]}I cannot add "functions" section as the configuration becomes invalid, because of the presence of the build section. I've tried to "export const maxDuration = 50" at multiple places in my Nest.js application, but it either breaks or doesn't take any effect.
Is there some workaround - I.e. how can I increase the limit of the function invocation for the whole backend or certain routes?
Even if I upgrade my plan, the default would be 15s, which I won't be able to increase further.
Thanks in advance!
