rsnext/errors/static-page-generation-timeout.md
Tobias Koppers 8bbb1cd353
use a shared worker pool for collecting page data and static page generation (#27924)
this avoid loading all code twice and hopefully improving performance
2021-08-12 19:54:49 +00:00

963 B

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 experimental.staticPageGenerationTimeout configuration option (default 60 in seconds).