rsnext/errors/static-page-generation-timeout.mdx
Delba de Oliveira 44d1a1cb15
docs: Migrate error messages to MDX and App Router. (#52038)
This PR is part of a larger effort to migrate error messages to MDX and
use App Router: https://github.com/vercel/front/pull/23459
2023-07-05 06:11:16 -07:00

21 lines
924 B
Text

---
title: Static page generation timed out after multiple attempts
---
## Why This Error Occurred
Next.js tries to restart the worker pool of the static page generation when no progress happens for a while, to avoid hanging builds.
When restarted it will retry all uncompleted jobs, but if a job was unsuccessfully attempted multiple times, this will lead to an error.
## Possible Ways to Fix It
- Make sure that there is no infinite loop during execution.
- Make sure all Promises in `getStaticPaths`/`getStaticProps` `resolve` or `reject` correctly.
- Avoid very long timeouts for network requests.
- Increase the timeout by changing the `staticPageGenerationTimeout` configuration option (default `60` in seconds).
## Useful Links
- [`getStaticPaths`](/docs/pages/building-your-application/data-fetching/get-static-paths)
- [`getStaticProps`](/docs/pages/building-your-application/data-fetching/get-static-props)