{"record":{"id":"69a3cb8b559f4d0a","repo":"windmill-labs/windmill","slug":"timed-out-waiting-for-job-jobid","errorCode":null,"errorMessage":"Timed out waiting for job ${jobId}","messagePattern":"Timed out waiting for job (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/workspaceSettings/deployToHubSession.svelte.ts","lineNumber":1826,"sourceCode":"\t// timeout (DuckLake/DuckDB steps routinely exceed a few minutes). Adds the\n\t// `#pipelineRunTok` cancellation the shared `makeWaitJobTerminal` lacks.\n\tasync #waitJobTerminal(jobId: string, tok: number): Promise<'success' | 'failure'> {\n\t\tconst deadline = Date.now() + CASCADE_JOB_TIMEOUT_MS\n\t\twhile (Date.now() < deadline) {\n\t\t\tif (tok !== this.#pipelineRunTok) throw new Error('cancelled')\n\t\t\ttry {\n\t\t\t\tconst r = await JobService.getCompletedJobResultMaybe({\n\t\t\t\t\tworkspace: this.workspace,\n\t\t\t\t\tid: jobId,\n\t\t\t\t\tgetStarted: false\n\t\t\t\t})\n\t\t\t\tif (r.completed) return r.success ? 'success' : 'failure'\n\t\t\t} catch {\n\t\t\t\t// transient — retry on the next tick\n\t\t\t}\n\t\t\tawait sleep(CASCADE_POLL_INTERVAL_MS)\n\t\t}\n\t\tthrow new Error(`Timed out waiting for job ${jobId}`)\n\t}\n\n\t/** Save the captured pipeline recording to the Hub, scoped to the project\n\t * (a pipeline is the whole folder, not a single Hub item). Returns true on\n\t * success. */\n\tasync savePipelineRecording(): Promise<boolean> {\n\t\tconst recording = this.pipelineRecordingResult\n\t\tif (!recording || this.pipelineRunState !== 'success') return false\n\t\tif (this.phase === 'predeploy') {\n\t\t\tsendUserToast(`Push the project to the Hub first before saving its pipeline recording`, true)\n\t\t\treturn false\n\t\t}\n\t\ttry {\n\t\t\tawait this.#postHub(`/hub/projects/${this.hubSlug}/pipeline_recording`, { recording })\n\t\t\tthis.pipelineRecorded = true\n\t\t\tsendUserToast(`Pipeline recording saved`)\n\t\t\treturn true\n\t\t} catch (e: any) {","sourceCodeStart":1808,"sourceCodeEnd":1844,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/workspaceSettings/deployToHubSession.svelte.ts#L1808-L1844","documentation":"When waiting for a cascade job (pipeline recording processing), the session polls the job status every CASCADE_POLL_INTERVAL_MS, tolerating transient errors, until it completes. If the job is still not completed when the polling budget is exhausted, it gives up with 'Timed out waiting for job <id>'.","triggerScenarios":"A Hub-side job (e.g. processing a saved pipeline recording) runs longer than the allotted polling window, or the polling requests keep failing transiently until the deadline passes.","commonSituations":"Hub backend busy or processing very large recordings; repeated network errors during polling; job stuck server-side (worker crashed) so it never reaches completed.","solutions":["Check the job's final state by id on the Hub — it may have completed after the client gave up","Retry the operation (re-save the recording) if the job failed or is stuck","Increase CASCADE_POLL_INTERVAL_MS budget/timeout if large recordings legitimately take longer","Inspect Hub worker logs for the job id to find why it never completed"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await session.savePipelineRecording()\n} catch (e) {\n  const m = /Timed out waiting for job (\\S+)/.exec(String(e.message))\n  if (m) {\n    // re-query job status by m[1] — it may have completed after the client timed out\n  }\n}","preventionTips":["Keep polling budgets larger than the worst-case processing time for large recordings","Handle transient poll failures with backoff so the budget isn't consumed by retries","If a job id is known after a timeout, check its final state server-side before re-running the operation","Monitor Hub workers so jobs don't stall unnoticed"],"tags":["timeout","polling","jobs","hub"],"backgroundTag":"job-poll-timeout","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}