tinacms/tina-self-hosted-demo

Static Page Generation Timeout During Build with Tinacms and Next.js 14

Opened this issue · 2 comments

Issue Summary:

When running tinacms build --partial-reindex && next build for my project, the static page generation times out repeatedly, causing the build process to fail.

Steps to Reproduce:

Run tinacms build --partial-reindex.
Run next build.
Observed Behavior:
The build process times out during static page generation with the following warnings and errors:

params::  { filename: [ 'themez22' ] } themez22.mdx
⚠ Sending SIGTERM signal to static worker due to timeout of 60 seconds. Subsequent errors may be a result of the worker exiting.
⚠ Restarted static page generation for /posts because it took more than 60 seconds
⚠ Restarted static page generation for /posts/theme because it took more than 60 seconds
⚠ Restarted static page generation for /posts/themez2 because it took more than 60 seconds
⚠ Restarted static page generation for /posts/themez22 because it took more than 60 seconds
Generating static pages (5/9)  [   =]params::  { filename: [ 'theme' ] } theme.mdx
params::  { filename: [ 'theme' ] } theme.mdx
Generating static pages (5/9)  [ ===]params::  { filename: [ 'themez22' ] } themez22.mdx
params::  { filename: [ 'themez22' ] } themez22.mdx
Generating static pages (5/9)  [==  ]params::  { filename: [ 'themez2' ] } themez2.mdx
params::  { filename: [ 'themez2' ] } themez2.mdx
⚠ Sending SIGTERM signal to static worker due to timeout of 60 seconds. Subsequent errors may be a result of the worker exiting.

> Build error occurred
Error: Static page generation for /posts is still timing out after 3 attempts. See more info here https://nextjs.org/docs/messages/static-page-generation-timeout
    at onRestart (/path/to/project/node_modules/next/dist/build/index.js:293:27)
    at /path/to/project/node_modules/next/dist/lib/worker.js:95:40
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /path/to/project/node_modules/next/dist/export/index.js:450:20
    at async Span.traceAsyncFn (/path/to/project/node_modules/next/dist/trace/trace.js:154:20)
    at async /path/to/project/node_modules/next/dist/export/index.js:448:24
    at async Promise.all (index 3)
    at async exportAppImpl (/path/to/project/node_modules/next/dist/export/index.js:440:21)
    at async /path/to/project/node_modules/next/dist/export/index.js:623:16
    at async Span.traceAsyncFn (/path/to/project/node_modules/next/dist/trace/trace.js:154:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected Behavior:
The build process should complete without timeouts and errors.

Environment:

next: 14.x.x
tinacms: ^1.6.7
Operating System: Macos (14.5 )
Additional Context:
The issue seems to be related to static page generation timing out. Any guidance on resolving this would be appreciated.

Hey @abhishek-mittal

Just noticed this and while I haven't fixed the issue as a whole the current work around is to lock the next version to 14.2.1

https://github.com/JackDevAU/tina-self-hosted-test/blob/dfa82907538c98843214c4a1f3db53be62035cf8/package.json#L25

I'll continue looking into this and add a PR to update this template in the coming days.

Having the same issue, locking next js version works as a work around.