-
SummaryMy account is currently subscribed to the Pro plan. So, according to the docs our functions should be able to have a max duration of up-to 300 seconds. But, I'm unable to configure the max duration or the memory of the functions of my deployment. Here's my {
"functions": {
"pages/portals/**/*": {
"maxDuration": 20,
"memory": 2048
},
"pages/topics/**/*": {
"maxDuration": 20,
"memory": 2048
},
"pages/api/revalidate.ts": {
"maxDuration": 30
}
}
}The folder structure looks like this: The deployment works as expected and I don't see any relevant errors on the build logs. But, after the deployment finishes, the properties of the functions are still the default values: Am I misconfiguring something? ExampleNo response Steps to ReproduceI'm not sure if this is replicable by others, but I have my {
"functions": {
"pages/portals/**/*": {
"maxDuration": 20,
"memory": 2048
},
"pages/topics/**/*": {
"maxDuration": 20,
"memory": 2048
},
"pages/api/revalidate.ts": {
"maxDuration": 30
}
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
|
Hey @lalish99. You can find some more info about configuring
I need to know a bit more about your project to be able to give a specific solution. If you have a minimal reproducible example, that would let me see what framework and architecture is used. |
Beta Was this translation helpful? Give feedback.
-
|
@amyegan Our project is currently running on NextJS The problem is that the configuration isn't applied for any of the created functions. So, I was just wondering if I've already read all of this discussion trying to troubleshoot. But honestly, I'm stuck. There are no clear errors on the logs, and the deployment works as expected. But as you can see, the functions still have the default configuration. The function shown in the following screenshot should have a max duration of 20 seconds, and a memory size of 2048 MB based on the {
"functions": {
"pages/portals/**/*": {
"maxDuration": 20,
"memory": 2048
},
"pages/topics/**/*": {
"maxDuration": 20,
"memory": 2048
},
"pages/api/revalidate.ts": {
"maxDuration": 30
}
}
} |
Beta Was this translation helpful? Give feedback.





I was able to see the problem and I have a solution. Your project uses a
/srcdirectory, so you'll need to include that In thevercel.jsonconfig. For example, if you change"pages/api/revalidate.ts"to"src/pages/api/revalidate.ts"you'll see the expected maximum execution duration reflected on a new deployment.