Increase timeout duration of api in vercel

Does anyone know how to increase timeout duration of api in vercel.

{
  "functions": {
    "api/src/functions/graphql.ts": {
      "maxDuration": 120
    }
  }
}

{
  "functions": {
    "api/graphql": {
      "maxDuration": 120
    }
  }
}

i tried above configurations but no luck.

i raised ticket in github but the answer didn鈥檛 fix the issue. 馃殤 VERCEL DEPLOYMENT Error: The pattern "api/*.js" defined in `functions` doesn't match any Serverless Functions. 路 vercel 路 Discussion #4391 路 GitHub

I have received a response from the Vercel support team. The issue has been resolved using the configuration provided below.

{
  "functions": {
    "api/src/functions/graphql.*": {
      "maxDuration": 120,
      "runtime": "@vercel/redwood@2.0.5"
    }
  }
}

Hi @dinakaranilabsinc that鈥檚 a great tip!

Any chance adding a PR to the documentation here to Deploy to Vercel | RedwoodJS Docs share this with others?

Sure @dthyresson. Here is the PR. Update vercel.md by dinakartumu 路 Pull Request #9370 路 redwoodjs/redwood 路 GitHub

1 Like

Looks great! Thanks so much for this contribution @dinakaranilabsinc !

It鈥檚 getting into main and should be in canary docs soon. And then published with next release.

1 Like