Skip to content

Commit

Permalink
Document staticPageGenerationTimeout config (#32306)
Browse files Browse the repository at this point in the history
* Document staticPageGenerationTimeout config

* Apply suggestions from code review

Co-authored-by: Steven <steven@ceriously.com>

* Reword no activity

* Apply suggestions from code review

Co-authored-by: Steven <steven@ceriously.com>

* fix lint-language

Co-authored-by: Steven <steven@ceriously.com>
  • Loading branch information
ijjk and styfle committed Dec 8, 2021
1 parent 0b86bfa commit 8d241ac
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/basic-features/data-fetching.md
Expand Up @@ -45,6 +45,7 @@ In addition, we’ll talk briefly about how to fetch data on the client side.

| Version | Changes |
| --------- | ----------------------------------------------------------------------------------------------------------------- |
| `v12.0.0` | `staticPageGenerationTimeout` added. |
| `v10.0.0` | `locale`, `locales`, `defaultLocale`, and `notFound` options added. |
| `v9.5.0` | Stable [Incremental Static Regeneration](https://nextjs.org/blog/next-9-5#stable-incremental-static-regeneration) |
| `v9.3.0` | `getStaticProps` introduced. |
Expand Down Expand Up @@ -220,6 +221,17 @@ function Blog({ posts }: InferGetStaticPropsType<typeof getStaticProps>) {
export default Blog
```

Note: Next.js has a default static generation timeout of 60 seconds. If no new pages complete generating within the timeout, it will attempt generation three more times. If the fourth attempt fails, the build will fail. This timeout can be modified using the following configuration:

```js
// next.config.js
module.exports = {
// time in seconds of no pages generating during static
// generation before timing out
staticPageGenerationTimeout: 90,
}
```

### Incremental Static Regeneration

<details open>
Expand Down

0 comments on commit 8d241ac

Please sign in to comment.