{"record":{"id":"a8522e6a2626c9e9","repo":"conductor-oss/conductor","slug":"workflow-timed-out-after-d-seconds-timeout-confi","errorCode":null,"errorMessage":"Workflow timed out after %d seconds. Timeout configured as %d seconds. Timeout policy configured to %s","messagePattern":"Workflow timed out after (.+?) seconds\\. Timeout configured as (.+?) seconds\\. Timeout policy configured to (.+?)","errorType":"exception","errorClass":"TerminateWorkflowException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java","lineNumber":766,"sourceCode":"\n        String reason =\n                String.format(\n                        \"Workflow timed out after %d seconds. Timeout configured as %d seconds. \"\n                                + \"Timeout policy configured to %s\",\n                        elapsedTime / 1000L,\n                        workflowDef.getTimeoutSeconds(),\n                        workflowDef.getTimeoutPolicy().name());\n\n        switch (workflowDef.getTimeoutPolicy()) {\n            case ALERT_ONLY:\n                LOGGER.info(\"{} {}\", workflow.getWorkflowId(), reason);\n                Monitors.recordWorkflowTermination(\n                        workflow.getWorkflowName(),\n                        WorkflowModel.Status.TIMED_OUT,\n                        workflow.getOwnerApp());\n                return;\n            case TIME_OUT_WF:\n                throw new TerminateWorkflowException(reason, WorkflowModel.Status.TIMED_OUT);\n        }\n    }\n\n    /**\n     * Enforces {@link TaskDef#getTotalTimeoutSeconds()} — a hard wall-clock budget that spans the\n     * entire lifetime of the task including all retry delays, not just a single attempt.\n     *\n     * <p>When the budget is exceeded the task is timed out via the same {@link\n     * #timeoutTaskWithTimeoutPolicy} path used for per-attempt timeouts, so the configured {@link\n     * TaskDef.TimeoutPolicy} still applies (ALERT_ONLY logs, RETRY sets TIMED_OUT which then fails\n     * permanently in {@link #retry}, TIME_OUT_WF terminates the workflow).\n     *\n     * <p>Tasks created before {@code firstScheduledTime} was introduced (value == 0) are skipped to\n     * preserve backward compatibility.\n     */\n    @VisibleForTesting\n    void checkTotalTimeout(TaskDef taskDef, TaskModel task) {\n        if (taskDef == null","sourceCodeStart":748,"sourceCodeEnd":784,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/core/src/main/java/com/netflix/conductor/core/execution/DeciderService.java#L748-L784","documentation":"checkWorkflowTimeout fires when elapsed time since create/lastRetry exceeds WorkflowDef.timeoutSeconds and the timeoutPolicy is TIME_OUT_WF. The engine throws a TerminateWorkflowException with status TIMED_OUT, terminating the whole workflow. With ALERT_ONLY the same condition only logs and records a metric.","triggerScenarios":"A workflow whose WorkflowDef.timeoutSeconds > 0 and timeoutPolicy=TIME_OUT_WF runs longer than the configured budget (elapsed = now - lastRetriedTime, or now - createTime).","commonSituations":"Long-running workflow whose steps collectively exceed timeoutSeconds; a stuck task blocking completion; timeoutSeconds set too low for the workflow's real duration.","solutions":["Raise WorkflowDef.timeoutSeconds to match the workflow's realistic end-to-end SLA.","Switch timeoutPolicy to ALERT_ONLY if you want notification without termination.","Find the stuck/slow task blocking workflow completion and fix or timeout it individually.","Verify lastRetriedTime/createTime are set correctly (a rerun resets the clock)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate the workflow timeout fits realistic duration before registering.\nif (def.getTimeoutSeconds() > 0 && def.getTimeoutSeconds() < minExpectedDurationSeconds(def)) {\n    LOGGER.warn(\"WorkflowDef {} timeoutSeconds={} may be too low\", def.getName(), def.getTimeoutSeconds());\n}","typeGuard":null,"tryCatchPattern":"try {\n    deciderService.decide(workflow);\n} catch (TerminateWorkflowException e) {\n    if (e.getStatus() == WorkflowModel.Status.TIMED_OUT) {\n        // consider ALERT_ONLY policy or raise timeoutSeconds\n    }\n}","preventionTips":["Set timeoutSeconds from measured end-to-end duration, not a guess.","Use ALERT_ONLY if you want notification without termination.","Find and fix stuck tasks that block completion."],"tags":["conductor","workflow","decider","workflow-timeout","terminate-workflow","time-out-wf"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}