Trouble changing default serverless execution duration on Vercel using vercel.json
Answered
Grass carp posted this in #help-forum
Grass carpOP
I have a Pro account on Vercel which should allow me to run 300 seconds long serverless functions. I tried to change the vercel.json file to contain the folllowing:
... to see if anything would change in vercel, but it still says 15 seconds.
I am using pages to create my API, and the structure is like:
{
"functions": {
"pages/api/**/*": {
"maxDuration": 300
}
}
}... to see if anything would change in vercel, but it still says 15 seconds.
I am using pages to create my API, and the structure is like:
/
vercel.json
- /pages
- /api
- /general
- feedback.ts
- fetchJob.ts
...Answered by Grass carp
Turns out that I need to put
in my function files directly instead of using vercel.json
export const config = {
maxDuration: 300
};in my function files directly instead of using vercel.json
1 Reply
Grass carpOP
Turns out that I need to put
in my function files directly instead of using vercel.json
export const config = {
maxDuration: 300
};in my function files directly instead of using vercel.json
Answer