{"record":{"id":"f709d27e6796c99e","repo":"vercel/next.js","slug":"sending-sigterm-signal-to-static-worker-due-to-tim","errorCode":null,"errorMessage":"Sending SIGTERM signal to static worker due to timeout${timeout ? ` of ${timeout / 1000} seconds` : ''}. Subsequent errors may be a result of the worker exiting.","messagePattern":"Sending SIGTERM signal to static worker due to timeout(.+?) seconds` : ''\\}\\. Subsequent errors may be a result of the worker exiting\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/lib/worker.ts","lineNumber":233,"sourceCode":"          callback()\n        },\n      })\n      // Stop the activity if there's any output from the worker\n      this._worker.getStdout().pipe(abortActivityStreamOnLog)\n      this._worker.getStderr().pipe(abortActivityStreamOnLog)\n\n      // Pipe the worker's stdout and stderr to the parent process\n      this._worker.getStdout().pipe(process.stdout)\n      this._worker.getStderr().pipe(process.stderr)\n    }\n    createWorker()\n\n    const onHanging = () => {\n      const worker = this._worker\n      if (!worker) return\n      const resolve = resolveRestartPromise\n      createWorker()\n      logger.warn(\n        `Sending SIGTERM signal to static worker due to timeout${\n          timeout ? ` of ${timeout / 1000} seconds` : ''\n        }. Subsequent errors may be a result of the worker exiting.`\n      )\n      worker.end().then(() => {\n        resolve(RESTARTED)\n      })\n    }\n\n    let hangingTimer: NodeJS.Timeout | false = false\n\n    const onActivityImpl = () => {\n      if (hangingTimer) clearTimeout(hangingTimer)\n      if (this._onActivity) this._onActivity()\n\n      hangingTimer = activeTasks > 0 && setTimeout(onHanging, timeout)\n    }\n","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/lib/worker.ts#L215-L251","documentation":"The worker wrapper's onHanging callback fires when a static worker shows no activity for the configured timeout; it sends SIGTERM to the stalled worker, recreates it (retrying the task), and warns that any subsequent errors likely stem from the terminated worker rather than the task itself.","triggerScenarios":"Thrown at packages/next/src/lib/worker.ts:233 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Investigate why the static worker hung (slow getStaticProps, infinite loops); increase the static generation timeout if needed."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}