[{"data":1,"prerenderedAt":474},["ShallowReactive",2],{"navigation":3,"page-\u002Ftroubleshooting\u002Fstart-and-health-failures":213,"surround-\u002Ftroubleshooting\u002Fstart-and-health-failures":469},[4,17,48,79,95,118,133,144,155,167,186],{"title":5,"path":6,"stem":7,"children":8,"icon":16,"exact":11},"Getting started","\u002Fgetting-started","1.getting-started\u002F1.index",[9,12],{"title":10,"path":6,"stem":7,"exact":11,"children":-1},"Introduction",true,{"title":13,"path":14,"stem":15,"exact":11,"children":-1},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F2.quickstart","i-lucide-rocket",{"title":18,"path":19,"stem":20,"children":21,"icon":47,"exact":11},"Reference","\u002Freference","10.reference\u002F1.index",[22,23,27,31,35,39,43],{"title":18,"path":19,"stem":20,"exact":11,"children":-1},{"title":24,"path":25,"stem":26,"exact":11,"children":-1},"Variables","\u002Freference\u002Fvariables","10.reference\u002F2.variables",{"title":28,"path":29,"stem":30,"exact":11,"children":-1},"Hostnames and DNS","\u002Freference\u002Fhostnames-and-dns","10.reference\u002F3.hostnames-and-dns",{"title":32,"path":33,"stem":34,"exact":11,"children":-1},"Statuses","\u002Freference\u002Fstatuses","10.reference\u002F4.statuses",{"title":36,"path":37,"stem":38,"exact":11,"children":-1},"Limits","\u002Freference\u002Flimits","10.reference\u002F5.limits",{"title":40,"path":41,"stem":42,"exact":11,"children":-1},"Sizes","\u002Freference\u002Fsizes","10.reference\u002F6.sizes",{"title":44,"path":45,"stem":46,"exact":11,"children":-1},"The GitHub App","\u002Freference\u002Fgithub-app","10.reference\u002F7.github-app","i-lucide-book-open",{"title":49,"path":50,"stem":51,"children":52,"icon":78,"exact":11},"Troubleshooting","\u002Ftroubleshooting","11.troubleshooting\u002F1.index",[53,54,58,62,66,70,74],{"title":49,"path":50,"stem":51,"exact":11,"children":-1},{"title":55,"path":56,"stem":57,"exact":11,"children":-1},"Build failures","\u002Ftroubleshooting\u002Fbuild-failures","11.troubleshooting\u002F2.build-failures",{"title":59,"path":60,"stem":61,"exact":11,"children":-1},"Start and health failures","\u002Ftroubleshooting\u002Fstart-and-health-failures","11.troubleshooting\u002F3.start-and-health-failures",{"title":63,"path":64,"stem":65,"exact":11,"children":-1},"Reference failures","\u002Ftroubleshooting\u002Freference-failures","11.troubleshooting\u002F4.reference-failures",{"title":67,"path":68,"stem":69,"exact":11,"children":-1},"Failures that are Kuppit's","\u002Ftroubleshooting\u002Ffailures-that-are-kuppits","11.troubleshooting\u002F5.failures-that-are-kuppits",{"title":71,"path":72,"stem":73,"exact":11,"children":-1},"Domain issues","\u002Ftroubleshooting\u002Fdomain-issues","11.troubleshooting\u002F6.domain-issues",{"title":75,"path":76,"stem":77,"exact":11,"children":-1},"No preview for a pull request","\u002Ftroubleshooting\u002Fno-preview-for-a-pull-request","11.troubleshooting\u002F7.no-preview-for-a-pull-request","i-lucide-life-buoy",{"title":80,"path":81,"stem":82,"children":83,"icon":94,"exact":11},"Concepts","\u002Fconcepts","2.concepts\u002F1.index",[84,86,90],{"title":85,"path":81,"stem":82,"exact":11,"children":-1},"The Kuppit model",{"title":87,"path":88,"stem":89,"exact":11,"children":-1},"The application graph","\u002Fconcepts\u002Fthe-application-graph","2.concepts\u002F2.the-application-graph",{"title":91,"path":92,"stem":93,"exact":11,"children":-1},"How a service runs","\u002Fconcepts\u002Fhow-a-service-runs","2.concepts\u002F3.how-a-service-runs","i-lucide-shapes",{"title":96,"path":97,"stem":98,"children":99,"icon":117,"exact":11},"Deployments","\u002Fdeployments","3.deployments\u002F1.index",[100,101,105,109,113],{"title":96,"path":97,"stem":98,"exact":11,"children":-1},{"title":102,"path":103,"stem":104,"exact":11,"children":-1},"Builds","\u002Fdeployments\u002Fbuilds","3.deployments\u002F2.builds",{"title":106,"path":107,"stem":108,"exact":11,"children":-1},"Redeploy and roll back","\u002Fdeployments\u002Fredeploy-and-rollback","3.deployments\u002F3.redeploy-and-rollback",{"title":110,"path":111,"stem":112,"exact":11,"children":-1},"Logs","\u002Fdeployments\u002Flogs","3.deployments\u002F4.logs",{"title":114,"path":115,"stem":116,"exact":11,"children":-1},"When a deployment fails","\u002Fdeployments\u002Fwhen-a-deployment-fails","3.deployments\u002F5.when-a-deployment-fails","i-lucide-cloud-upload",{"title":119,"path":120,"stem":121,"children":122,"icon":132,"exact":11},"Resources","\u002Fresources","4.resources\u002F1.index",[123,124,128],{"title":119,"path":120,"stem":121,"exact":11,"children":-1},{"title":125,"path":126,"stem":127,"exact":11,"children":-1},"Web services","\u002Fresources\u002Fweb-services","4.resources\u002F2.web-services",{"title":129,"path":130,"stem":131,"exact":11,"children":-1},"PostgreSQL","\u002Fresources\u002Fpostgresql","4.resources\u002F3.postgresql","i-lucide-boxes",{"title":134,"icon":135,"path":136,"stem":137,"children":138,"page":143,"exact":11},"Configuration","i-lucide-sliders-horizontal","\u002Fconfiguration","5.configuration",[139],{"title":140,"path":141,"stem":142,"exact":11,"children":-1},"Environment variables","\u002Fconfiguration\u002Fvariables","5.configuration\u002F1.variables",false,{"title":145,"path":146,"stem":147,"children":148,"icon":154,"exact":11},"Networking","\u002Fnetworking","6.networking\u002F1.index",[149,150],{"title":145,"path":146,"stem":147,"exact":11,"children":-1},{"title":151,"path":152,"stem":153,"exact":11,"children":-1},"Reaching a database","\u002Fnetworking\u002Freaching-a-database","6.networking\u002F2.reaching-a-database","i-lucide-network",{"title":156,"path":157,"stem":158,"children":159,"icon":166,"exact":11},"Domains","\u002Fdomains","7.domains\u002F1.index",[160,162],{"title":161,"path":157,"stem":158,"exact":11,"children":-1},"Hostnames",{"title":163,"path":164,"stem":165,"exact":11,"children":-1},"Custom domains","\u002Fdomains\u002Fcustom-domains","7.domains\u002F2.custom-domains","i-lucide-globe",{"title":168,"path":169,"stem":170,"children":171,"icon":185,"exact":11},"Environments","\u002Fenvironments","8.environments\u002F1.index",[172,173,177,181],{"title":168,"path":169,"stem":170,"exact":11,"children":-1},{"title":174,"path":175,"stem":176,"exact":11,"children":-1},"Preview environments","\u002Fenvironments\u002Fpreview-environments","8.environments\u002F2.preview-environments",{"title":178,"path":179,"stem":180,"exact":11,"children":-1},"Named environments","\u002Fenvironments\u002Fnamed-environments","8.environments\u002F3.named-environments",{"title":182,"path":183,"stem":184,"exact":11,"children":-1},"Deleting an environment","\u002Fenvironments\u002Fdeleting-an-environment","8.environments\u002F4.deleting-an-environment","i-lucide-git-branch",{"title":187,"path":188,"stem":189,"children":190,"icon":212,"exact":11},"Guides","\u002Fguides","9.guides\u002F1.index",[191,192,196,200,204,208],{"title":187,"path":188,"stem":189,"exact":11,"children":-1},{"title":193,"path":194,"stem":195,"exact":11,"children":-1},"Deploy a Nuxt application","\u002Fguides\u002Fdeploy-a-nuxt-application","9.guides\u002F2.deploy-a-nuxt-application",{"title":197,"path":198,"stem":199,"exact":11,"children":-1},"Deploy a Next.js application","\u002Fguides\u002Fdeploy-a-nextjs-application","9.guides\u002F3.deploy-a-nextjs-application",{"title":201,"path":202,"stem":203,"exact":11,"children":-1},"Deploy an Express application","\u002Fguides\u002Fdeploy-an-express-application","9.guides\u002F4.deploy-an-express-application",{"title":205,"path":206,"stem":207,"exact":11,"children":-1},"Deploy with a Dockerfile","\u002Fguides\u002Fdeploy-with-a-dockerfile","9.guides\u002F5.deploy-with-a-dockerfile",{"title":209,"path":210,"stem":211,"exact":11,"children":-1},"Create a staging environment","\u002Fguides\u002Fcreate-a-staging-environment","9.guides\u002F6.create-a-staging-environment","i-lucide-map",{"id":214,"title":59,"badge":215,"body":216,"category":215,"description":463,"draft":143,"extension":464,"links":215,"meta":465,"navigation":11,"path":60,"seo":466,"sitemap":467,"stem":61,"__hash__":468},"docs\u002F11.troubleshooting\u002F3.start-and-health-failures.md",null,{"type":217,"value":218,"toc":459},"minimark",[219,232,237,240,247,297,301,304,311,402,405,445,455],[220,221,222,223,227,228,231],"p",{},"Both failures happen after the build. The page is titled ",[224,225,226],"strong",{},"Deployment failed",", and the ",[224,229,230],{},"Runtime"," log is the one to read: it is what the container wrote in the seconds before Kuppit gave up on it. Traffic was not moved.",[233,234,236],"h3",{"id":235},"the-new-revision-could-not-start","The new revision could not start",[220,238,239],{},"The container exited before it was healthy. Something in your start-up path threw, or the process ended on its own.",[220,241,242,243,246],{},"Open ",[224,244,245],{},"View relevant logs",". What you are looking for is the last thing the process printed. The usual causes:",[248,249,250,257,272,291],"ul",{},[251,252,253,256],"li",{},[224,254,255],{},"A crash on boot."," An unhandled exception while connecting to something, reading configuration, or importing a module that is not in the image.",[251,258,259,262,263,265,266,271],{},[224,260,261],{},"A variable the code requires but the service does not have."," Check the service's ",[224,264,24],{}," tab, including what it inherits from the environment; a value set after the last deployment needs a redeploy to be present. See ",[267,268,270],"a",{"href":269},"\u002Fconfiguration\u002Fvariables#when-a-change-takes-effect","when a change takes effect",".",[251,273,274,277,278,281,282,285,286,290],{},[224,275,276],{},"No start command, or the wrong one."," For an automatic build, the ",[224,279,280],{},"Start command"," on ",[224,283,284],{},"Settings"," must start a server that stays running. A script that builds and exits, or a ",[287,288,289],"code",{},"start"," that runs tests, ends the process.",[251,292,293,296],{},[224,294,295],{},"A database that is not ready or not reachable."," A reference resolves to real credentials, but the application still has to connect. A connection error at boot is in your log, with the address it tried.",[233,298,300],{"id":299},"the-application-did-not-become-healthy","The application did not become healthy",[220,302,303],{},"The container ran, but nothing answered on the port Kuppit routes to, so the health check never passed.",[220,305,306,307,310],{},"Kuppit sets ",[287,308,309],{},"PORT"," and sends the health check to it. Your server must listen on that port, on all interfaces:",[312,313,319],"pre",{"className":314,"code":315,"filename":316,"language":317,"meta":318,"style":318},"language-ts shiki shiki-themes material-theme-lighter github-light github-dark","const port = Number(process.env.PORT ?? 8080)\n\nserver.listen(port, '0.0.0.0')\n","server.ts","ts","",[287,320,321,366,372],{"__ignoreMap":318},[322,323,326,330,334,338,342,346,349,352,354,356,359,363],"span",{"class":324,"line":325},"line",1,[322,327,329],{"class":328},"sbsja","const",[322,331,333],{"class":332},"s_hVV"," port",[322,335,337],{"class":336},"smGrS"," =",[322,339,341],{"class":340},"sGLFI"," Number",[322,343,345],{"class":344},"su5hD","(process",[322,347,271],{"class":348},"sP7_E",[322,350,351],{"class":344},"env",[322,353,271],{"class":348},[322,355,309],{"class":332},[322,357,358],{"class":336}," ??",[322,360,362],{"class":361},"srdBf"," 8080",[322,364,365],{"class":344},")\n",[322,367,369],{"class":324,"line":368},2,[322,370,371],{"emptyLinePlaceholder":11},"\n",[322,373,375,378,380,383,386,389,393,397,400],{"class":324,"line":374},3,[322,376,377],{"class":344},"server",[322,379,271],{"class":348},[322,381,382],{"class":340},"listen",[322,384,385],{"class":344},"(port",[322,387,388],{"class":348},",",[322,390,392],{"class":391},"sjJ54"," '",[322,394,396],{"class":395},"s_sjI","0.0.0.0",[322,398,399],{"class":391},"'",[322,401,365],{"class":344},[220,403,404],{},"Check, in order:",[248,406,407,419,433,439],{},[251,408,409,412,413,415,416,418],{},[224,410,411],{},"The port."," A hard-coded port, or ",[287,414,309],{}," read before it exists, means the health check knocks on a door nothing is behind. Nuxt and Next.js read ",[287,417,309],{}," themselves; Express and plain Node do not.",[251,420,421,424,425,428,429,432],{},[224,422,423],{},"The interface."," A server bound to ",[287,426,427],{},"localhost"," or ",[287,430,431],{},"127.0.0.1"," accepts nothing from outside the container.",[251,434,435,438],{},[224,436,437],{},"Start-up time."," A process that takes minutes to be ready, building on boot or warming a large cache, can run out of the check's patience. Do that work at build time, or start listening first and finish warming after.",[251,440,441,444],{},[224,442,443],{},"The response."," The check needs a response, not a healthy one: a server that answers with an error is up, a server that hangs is not. Something blocking the event loop at start-up is the usual cause of a hang.",[220,446,447,454],{},[267,448,450,451,453],{"href":449},"\u002Fresources\u002Fweb-services#the-port-contract","The ",[287,452,309],{}," contract"," has the full rule.",[456,457,458],"style",{},"html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .s_hVV, html code.shiki .s_hVV{--shiki-light:#90A4AE;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":318,"searchDepth":374,"depth":374,"links":460},[461,462],{"id":235,"depth":374,"text":236},{"id":299,"depth":374,"text":300},"The image built, but the revision did not start or never answered. What the two messages mean and where to look.","md",{},{"title":59,"description":463},{"loc":60},"Y_vOjeJdFYlYXp0So30bkahW-ZWNunh5zkFSrOYL4pQ",[470,472],{"title":55,"path":56,"stem":57,"description":471,"children":-1},"The six ways turning a commit into an image can fail, and what to do about each.",{"title":63,"path":64,"stem":65,"description":473,"children":-1},"A variable points at a database it cannot resolve to. Nothing was built; the fix is on the Variables tab.",1788549619393]