{"record":{"id":"013e84a22ccfd0dc","repo":"docker/compose","slug":"timeout-waiting-for-dependencies","errorCode":null,"errorMessage":"timeout waiting for dependencies","messagePattern":"timeout waiting for dependencies","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/compose/convergence.go","lineNumber":259,"sourceCode":"\t\t\t\t\t\t\treturn nil\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tmsg := fmt.Sprintf(\"service %s\", messageSuffix)\n\t\t\t\t\t\ts.events.On(containerEvents(waitingFor, func(s string) api.Resource {\n\t\t\t\t\t\t\treturn errorEventf(s, \"service %s\", messageSuffix)\n\t\t\t\t\t\t})...)\n\t\t\t\t\t\treturn errors.New(msg)\n\t\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tlogrus.Warnf(\"unsupported depends_on condition: %s\", config.Condition)\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t}\n\terr := eg.Wait()\n\tif errors.Is(err, context.DeadlineExceeded) {\n\t\treturn fmt.Errorf(\"timeout waiting for dependencies\")\n\t}\n\treturn err\n}\n\nfunc shouldWaitForDependency(serviceName string, dependencyConfig types.ServiceDependency, project *types.Project) (bool, error) {\n\tif dependencyConfig.Condition == types.ServiceConditionStarted {\n\t\t// already managed by InDependencyOrder\n\t\treturn false, nil\n\t}\n\tif service, err := project.GetService(serviceName); err != nil {\n\t\tfor _, ds := range project.DisabledServices {\n\t\t\tif ds.Name == serviceName {\n\t\t\t\t// don't wait for disabled service (--no-deps)\n\t\t\t\treturn false, nil\n\t\t\t}\n\t\t}\n\t\treturn false, err\n\t} else if service.GetScale() == 0 {","sourceCodeStart":241,"sourceCodeEnd":277,"githubUrl":"https://github.com/docker/compose/blob/ddc4b044b62e9f715212ea4143fa830fac76382f/pkg/compose/convergence.go#L241-L277","documentation":"Error \"timeout waiting for dependencies\" thrown in docker/compose.","triggerScenarios":"Raised when the dependencies of a service do not reach a healthy/started state before the wait deadline expires during service startup ordering.","commonSituations":"A dependency has a slow or failing healthcheck, a long-running initialization, or a condition such as service_healthy that never becomes true.","solutions":["Increase the wait timeout or investigate why the dependency is slow to become healthy.","Review the dependency's healthcheck configuration; an over-strict or broken healthcheck blocks startup.","Run docker compose ps and docker compose logs on the dependencies to see which one never became ready."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ddc4b044b62e9f715212ea4143fa830fac76382f","analyzedAt":"2026-08-15T13:31:42.319Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}