Unverified Commit 8e3e4adf authored by Lee Robinson's avatar Lee Robinson Committed by GitHub

docs: update `maxDuration` info (#60086)

parent 7cbcea30
...@@ -200,8 +200,10 @@ Support for `preferredRegion`, and regions supported, is dependent on your deplo ...@@ -200,8 +200,10 @@ Support for `preferredRegion`, and regions supported, is dependent on your deplo
### `maxDuration` ### `maxDuration`
Based on your deployment platform, you may be able to use a higher default execution time for your function. By default, Next.js does not limit the execution of server-side logic (rendering a page or handling an API).
This setting allows you to opt into a higher execution time within your plans limit. Deployment platforms can use `maxDuration` from the Next.js build output to add specific execution limits.
For example, on [Vercel](https://vercel.com/docs/functions/serverless-functions/runtimes#max-duration).
**Note**: This settings requires Next.js `13.4.10` or higher. **Note**: This settings requires Next.js `13.4.10` or higher.
```tsx filename="layout.tsx | page.tsx | route.ts" switcher ```tsx filename="layout.tsx | page.tsx | route.ts" switcher
...@@ -212,10 +214,6 @@ export const maxDuration = 5 ...@@ -212,10 +214,6 @@ export const maxDuration = 5
export const maxDuration = 5 export const maxDuration = 5
``` ```
> **Good to know**:
>
> - If a `maxDuration` is not specified, the default value is dependent on your deployment platform and plan.
### `generateStaticParams` ### `generateStaticParams`
The `generateStaticParams` function can be used in combination with [dynamic route segments](/docs/app/building-your-application/routing/dynamic-routes) to define the list of route segment parameters that will be statically generated at build time instead of on-demand at request time. The `generateStaticParams` function can be used in combination with [dynamic route segments](/docs/app/building-your-application/routing/dynamic-routes) to define the list of route segment parameters that will be statically generated at build time instead of on-demand at request time.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment