[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"problem-detail-error-compose-service-starts-before-the-service-it-depends":3},{"stack":4,"error":5,"seoName":6,"seoStack":7,"seo":8,"breadcrumb":10,"titlePrefix":17,"titleAccent":6,"lead":18,"facts":21,"why":36,"log":41,"fix":62,"engine":76,"related":80,"pitch":87},"compose","compose-service-starts-before-the-service-it-depends","Compose service starts before the service it depends on is ready","Docker Compose",{"description":9},"The service project-backend-api-1 did not start (unhealthy), so the application was not started either. It printed: The above exception was the direct cause of ",[11,14,16],{"label":12,"href":13},"App Installations","\u002Fapps",{"label":7,"href":15},"\u002Fapps\u002Fstacks\u002Fcompose",{"label":6},"",[19],{"text":20},"The service project-backend-api-1 did not start (unhealthy), so the application was not started either. It printed: The above exception was the direct cause of the following exception: Traceback (most recent call last): File \"\u002Fusr\u002Flocal\u002Flib\u002Fpython3.10\u002Fsite-packages\u002Fstarlette\u002Frouting.py\", line 734, in lifespan async with self.lifespan_context(app) as maybe_state: File \"\u002Fusr\u002Flocal\u002Flib\u002Fpython3.10\u002Fcontextlib.py\", line 199, in __aenter__… The full output is in the deploy log.",[22,27,30,32],{"label":23,"value":24,"tone":25,"tooltip":26},"Type","Error","err","An error that occurred in the deployed application. It is not necessarily a PanelAlpha Engine error, but we keep working on improvements so you run into fewer of them.",{"label":28,"value":29},"Seen","1 times",{"label":31,"value":7},"Where",{"label":33,"value":34,"tooltip":35},"Status","In Analysis","Our team will look into this soon, verify the cause and try to fix it in an upcoming release.",{"heading":37,"body":38},"Why it happens",[39],{"text":40},"The repository's compose file lets a service start as soon as its dependency's container exists, not when it is healthy. The service calls the dependency during boot, finds nothing listening yet, and exits.",{"heading":42,"block":43},"What the log looks like",{"header":44,"lines":45},"Deploy log",[46,50,54,58],{"segments":47},[48],{"text":49},"error: service project-backend-api-1 did not start (unhealthy): The above exception was the direct cause of the following exception: Traceback (most recent call last): File \"\u002Fusr\u002Flocal\u002Flib\u002Fpython3.10\u002Fsite-packages\u002Fstarlette\u002Frouting.py\", line 734, in lifespan async with self.lifespan_context(app) as maybe_state: File \"\u002Fusr\u002Flocal\u002Flib\u002Fpython3.10\u002Fcontextlib.py\", line 199, in __aenter__ return await anext(self.gen)",{"segments":51},[52],{"text":53},"Container project-backend-api-1 Error dependency backend-api failed to start",{"segments":55},[56],{"text":57},"Container project-backend-web-1 Error dependency backend-web failed to start",{"segments":59},[60],{"text":61},"dependency failed to start: cont…",{"heading":63,"steps":64,"block":73},"How to fix it",[65],[66,68,71],{"text":67},"Until the engine handles it, change that depends_on entry in the compose file to ",{"text":69,"code":70},"backend-inference: {condition: service_healthy}",true,{"text":72}," (the dependency already has a healthcheck) and redeploy.",{"header":74,"lines":75},"Fix by hand",[],{"heading":17,"body":77,"block":78},[],{"header":17,"lines":79},[],{"heading":81,"items":82},"Apps affected",[83],{"title":84,"badge":85,"tone":25,"href":86},"TaskingAI","1 occurrence","\u002Fapps\u002Ftaskingai\u002Ftaskingai",{"heading":88,"body":89,"footNote":90,"docsLabel":91,"docsHref":92},"Try PanelAlpha Engine yourself.","The easiest way to turn your server into a safe, controlled environment for your AI agent. Deploy, manage and maintain any project from Claude Code, Cursor, Codex or any other MCP client. Open source under Apache 2.0, free to run.","Requires Ubuntu 24.04 or 26.04 · 2 GB RAM · 1 CPU","Read the documentation","https:\u002F\u002Fpanelalpha.com\u002Fdocs"]