Nest.js - increase max duration timeout

As far as I know exporting maxDuration won’t work as we don’t support it in Nest.js.
I haven’t tested this with Nest.js, but it might be possible to do something like this in vercel.json?

{
  "functions": {
    "src/main.ts": {
      "runtime": "@vercel/node",
      "maxDuration": 30
    }
  }
}

Alternatively you can now configure the default project function timeout.
For this head to your Project in the Dashboard and look under Settings > Functions:

Please note that this can impact your billing. Keep the default duration as low as possible to ensure your function execution will be terminated when you have hanging promises or other reasons your code takes a long time to run.

2 Likes