{"id":2350,"date":"2026-11-20T11:50:00","date_gmt":"2026-11-20T11:50:00","guid":{"rendered":"https:\/\/devopsschool.org\/blog\/debug-crash-looping-container-by-explaining-it-aloud\/"},"modified":"2026-11-20T11:50:00","modified_gmt":"2026-11-20T11:50:00","slug":"debug-crash-looping-container-by-explaining-it-aloud","status":"publish","type":"post","link":"https:\/\/devopsschool.org\/blog\/debug-crash-looping-container-by-explaining-it-aloud\/","title":{"rendered":"How to Debug a Crash-Looping Container by Explaining It Aloud"},"content":{"rendered":"<p>A junior engineer on a platform team once told me about the afternoon a container kept restarting and every guess made it worse. They had three terminals open, a pile of half-read documentation and the creeping feeling of being the only person who did not understand the system. Then a senior colleague, walking past, suggested something odd: &#8220;Tell it to the duck on my desk.&#8221; This how-to follows that afternoon step by step, so you can use the same method on a crash-looping container the next time your own terminal fills with red.<\/p>\n<h2>Step 1: Get a silent listener<\/h2>\n<p>Choose something that cannot reply. The rubber duck is traditional in software, but a mug or a monitor works. The silence is not a detail. A human listener would nod, ask a question or finish your sentence, and each of those rescues you from the very gap you need to find.<\/p>\n<h2>Step 2: State the goal and the symptom, one sentence each<\/h2>\n<p>The junior engineer began: &#8220;I want this service to stay running. Instead the container starts, runs for a few seconds and exits, and the orchestrator restarts it.&#8221; Short, factual and free of theories. If you cannot state the symptom in a single sentence, that alone is a finding, and you should spend a minute looking at the actual status before continuing.<\/p>\n<h2>Step 3: Walk the startup path in order<\/h2>\n<p>Now say, in the order they happen, the things that occur between &#8220;container created&#8221; and &#8220;container exits&#8221;. For the story&#8217;s example: &#8220;The image starts. The entry script runs. It reads a settings file. It connects to the database. It starts the server.&#8221; Name each component using its real file name or command. Do not summarise. Every verb needs an object, and every object needs a location.<\/p>\n<h2>Step 4: Slow down at every &#8220;it just&#8221;<\/h2>\n<p>Phrases such as &#8220;it just reads the settings&#8221; or &#8220;it just connects&#8221; are shortcuts your brain takes. When you hear one, stop and expand it. The engineer reached &#8220;it reads a settings file&#8221; and paused: which file, mounted from where? A second pause followed: is that file present when the container is created by the orchestrator, or only on the laptop where it worked? The answer, spoken aloud for the first time, was that the file was copied into the image locally but excluded from the shared build by an ignore rule.<\/p>\n<h2>Step 5: Mark every belief with a &#8220;should&#8221;<\/h2>\n<p>Keep a pen beside the keyboard and tick each time you say &#8220;should&#8221;, &#8220;probably&#8221; or &#8220;I think&#8221;. In the story there were four ticks. &#8220;The file should be in the image.&#8221; &#8220;The permissions should be fine.&#8221; &#8220;The database should be reachable.&#8221; &#8220;The port should be free.&#8221; Four beliefs, none tested.<\/p>\n<h2>Step 6: Test the first belief only<\/h2>\n<p>Pick the first tick and test it on its own. The engineer listed the files inside the built image with a single command. The settings file was missing. One belief, one command, one clear answer. Resisting the urge to test all four at once is what keeps the evidence clean.<\/p>\n<h2>Step 7: Fix one thing, then start the narration again<\/h2>\n<p>With the ignore rule corrected and the image rebuilt, the container still exited, but later. That was progress, not failure. The engineer restarted the narration from the top and reached &#8220;connects to the database&#8221; before stalling: the connection address in the settings file pointed at a service name that exists only in the local development setup. A second one-line fix followed. The container stayed up.<\/p>\n<h2>Step 8: Write the gap down in one sentence<\/h2>\n<p>Few people bother with this final step, and it is the one that pays back longest. The engineer wrote: &#8220;The build excluded the settings file, and the file contained a local-only address.&#8221; That single sentence, kept in the team&#8217;s notes, is what turns an afternoon of struggle into reusable knowledge for the next person.<\/p>\n<h2>Why this belongs in a DevOps career toolkit<\/h2>\n<p>Troubleshooting is a core part of working in operations and platform roles, and the ability to structure a problem is more visible to colleagues than any single command you know. Explaining aloud trains structure, and structure is what makes your diagnosis understandable to the people you eventually do ask for help. If you want to build the wider habit of reasoning clearly, <a href=\"https:\/\/devopsschool.org\/blog\/devops-problem-solving-how-to-build-critical-thinking-skills\/\">a read on thinking clearly while solving operations puzzles<\/a> is a natural next read, and <a href=\"https:\/\/devopsschool.org\/blog\/devops-for-it-transformation-practical-skills-roadmap-and-strategy\/\">a roadmap covering skills and strategy for modernising IT<\/a> shows where this kind of clear thinking fits in a longer career.<\/p>\n<h2>If the narration finds nothing<\/h2>\n<p>Sometimes you reach the end of Step 3 without a single stall. Do not read that as failure. It tells you the gap sits outside your current picture of the system, perhaps in a platform behaviour you have never met. At that point you have earned the right to open the logs, read the platform documentation or bring in a colleague, and you can do so with a precise account of everything you already ruled out. That account is worth far more to a helper than &#8220;it keeps crashing&#8221;.<\/p>\n<h2>A side note on browsing practice<\/h2>\n<p>You can apply the same narration to reading any structured site while you study. For example, <a href=\"https:\/\/gastrohospitals.com\/\">GastroHospitals is a directory website around a gastroenterology theme, with hospital, doctor, blog and forum parts<\/a>, and describing aloud how a visitor would move from the home page into each part is a small, low-stakes exercise in thinking about structure. The subject matter is irrelevant to the practice.<\/p>\n<h2>What to watch out for<\/h2>\n<ul>\n<li><strong>Do not rush.<\/strong> Speaking quickly lets the fluent blur back in.<\/li>\n<li><strong>Do not skip the easy parts.<\/strong> The settings file in the story felt too obvious to mention.<\/li>\n<li><strong>Do not treat fluency as proof.<\/strong> Test claims against the running system.<\/li>\n<li><strong>Do not stop when the first fix works.<\/strong> Restart the narration from the beginning.<\/li>\n<\/ul>\n<p>The junior engineer never did give the duck a name. But the next time the container misbehaved on another service, the duck was already facing the right way on the desk, and the whole thing took twelve minutes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An eight-step walkthrough of narrating a restarting container to a silent listener, following one junior engineer&#8217;s afternoon from red terminals to a one-line fix.<\/p>\n","protected":false},"author":5,"featured_media":2351,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[489],"tags":[],"class_list":["post-2350","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops-careers"],"_links":{"self":[{"href":"https:\/\/devopsschool.org\/blog\/wp-json\/wp\/v2\/posts\/2350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devopsschool.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devopsschool.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devopsschool.org\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/devopsschool.org\/blog\/wp-json\/wp\/v2\/comments?post=2350"}],"version-history":[{"count":0,"href":"https:\/\/devopsschool.org\/blog\/wp-json\/wp\/v2\/posts\/2350\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devopsschool.org\/blog\/wp-json\/wp\/v2\/media\/2351"}],"wp:attachment":[{"href":"https:\/\/devopsschool.org\/blog\/wp-json\/wp\/v2\/media?parent=2350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devopsschool.org\/blog\/wp-json\/wp\/v2\/categories?post=2350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devopsschool.org\/blog\/wp-json\/wp\/v2\/tags?post=2350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}