2021-07-16 11:21:44 +02:00
|
|
|
# Collecting page data timed out after multiple attempts
|
|
|
|
|
|
|
|
#### Why This Error Occurred
|
|
|
|
|
|
|
|
Next.js tries to restart the worker pool of the page data collection 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` `resolve` or `reject` correctly.
|
|
|
|
- Avoid very long timeouts for network requests.
|
2021-10-20 21:35:32 +02:00
|
|
|
- Increase the timeout by changing the `config.staticPageGenerationTimeout` configuration option (default `60` in seconds).
|
2021-07-16 11:21:44 +02:00
|
|
|
|
|
|
|
### Useful Links
|
|
|
|
|
2022-01-29 03:52:40 +01:00
|
|
|
- [`getStaticPaths`](/docs/basic-features/data-fetching/get-static-paths.md)
|