{"id":6270,"date":"2026-11-16T14:20:00","date_gmt":"2026-11-16T14:20:00","guid":{"rendered":"https:\/\/www.cmsgalaxy.com\/blog\/?p=6270"},"modified":"2026-11-19T04:20:00","modified_gmt":"2026-11-19T04:20:00","slug":"containerops-site-restarts-diagnosis","status":"publish","type":"post","link":"https:\/\/www.cmsgalaxy.com\/blog\/containerops-site-restarts-diagnosis\/","title":{"rendered":"Why the Site Went Down on Every Deploy: A ContainerOps Diagnosis"},"content":{"rendered":"<p>The ticket arrived on a Monday: the client&#8217;s content site went down for about a minute every time the team published an update, and sometimes it stayed down for longer. The web team had checked the CMS, the theme and the plugins, and found nothing wrong. Eventually someone looked at the container underneath, and that is where this diagnosis begins. It is a story about ContainerOps, written as a problem followed by a solution, because the pattern repeats on many web projects.<\/p>\n<p>The Ops Atlas uses the name ContainerOps for the care of individual containers beneath any orchestrator, and it admits the label is not an established industry term. For the background we lean on <a href=\"https:\/\/www.xopsschool.com\/containerops\/\">the Atlas page that defines ContainerOps<\/a>, and the sections below match each symptom to what it says.<\/p>\n<h2>Symptom one: restarts that take ten seconds too long<\/h2>\n<p>The first clue was in the deploy log. Every time the team replaced the CMS container, the old one lingered for ten seconds and then disappeared with exit code 137. That number is 128 plus 9, the signal for a forced kill. Nothing had crashed. The container had been asked to stop, did not respond, and was cut off after the grace period, which defaults to ten seconds in Compose.<\/p>\n<p>The cause was a one-line habit in the image: the start command was written in shell form. That wraps the web server in a small shell, and the shell does not pass the stop signal to the program it launched. The web server never heard the request, so it never finished its in-flight requests or closed its connections. Visitors who happened to be mid-request saw an error page.<\/p>\n<p><strong>The solution<\/strong> was in three parts, all suggested by the Atlas: write the command in exec form so the web server receives the signal itself, make sure the application handles that signal by finishing work and exiting, and add an init process so stray child processes are cleaned up.<\/p>\n<h2>Symptom two: the site slows down at the worst moments<\/h2>\n<p>After the first fix, a second pattern emerged. Page speed dipped during traffic bursts even though the monitoring chart showed plenty of spare processor capacity. The team had put a processor cap on the container to be &#8220;fair&#8221; to its neighbours, and the cap was throttling it in short bursts.<\/p>\n<p>The Atlas explains this with a worked case. In its illustration a workload capped at two CPUs burned 90 CPU-seconds inside a single minute, which is 1.5 CPUs on average, while 240 of the 600 scheduling windows ended in throttling. The average hid the waiting. The measure to track is throttled periods divided by total periods, and the Atlas suggests staying under five percent for latency-sensitive services.<\/p>\n<p><strong>The solution<\/strong> was to remove the tight processor cap, keep the memory and process limits, and watch the throttle ratio. A limit that guards the machine is useful; one that stalls the site is not.<\/p>\n<h2>Symptom three: a disk that fills for no obvious reason<\/h2>\n<p>Three weeks later the server ran out of space. Nobody had uploaded anything large. The culprit was the container log file. The default JSON logging driver writes without rotation, so a verbose plugin had been writing for months. Unrotated logs appear on the Atlas&#8217;s anti-pattern list.<\/p>\n<p><strong>The solution<\/strong> was simple once found: set a maximum size and number of files for the log driver, and note the setting in the project&#8217;s runbook so new environments inherit it.<\/p>\n<h2>Symptom four: a &#8220;private&#8221; admin page that was not<\/h2>\n<p>While reviewing the Compose file, the team found the database port published as a plain mapping with no address. In the Atlas&#8217;s words, that binds on every interface, and the rule bypasses the common host firewall tools. Docker itself refers to this default as insecure. The firewall they believed in had never been in the path.<\/p>\n<p><strong>The solution<\/strong> was to bind the port to the loopback address, or remove the mapping entirely and let the CMS talk to the database over an internal network.<\/p>\n<h2>Symptom five: updates nobody could trace<\/h2>\n<p>Finally, a staging bug could not be reproduced in production because nobody knew whether both environments ran the same image. Both used a tag called latest. The Atlas lists floating tags and tag-based deploys as anti-patterns, and recommends promoting by digest with immutable release tags.<\/p>\n<p><strong>The solution<\/strong> was to record the digest of each release and deploy that exact value. To avoid the opposite problem, pinned images that never receive fixes, the team set up a bot to propose base-image updates for review.<\/p>\n<h2>The detour that nearly derailed the fix<\/h2>\n<p>It is worth admitting that the team&#8217;s first instinct on the shell-form problem was to raise the grace period from ten seconds to sixty. That made the site slower to restart without changing the underlying behaviour, because the program still never received the request. The longer wait simply delayed the same forced kill. Only after one of the developers ran a test container, sent it a stop request by hand and watched which process received it, did the shell wrapper become visible. A habit worth borrowing: when a symptom has a plausible quick patch, reproduce it on a throwaway container first and see whether the patch changes anything.<\/p>\n<p>The same developer also pointed out a subtle thing about resource limits. When a container is killed for memory reasons, the exit code is the same 137, so the team had to look at the container&#8217;s state and the kernel&#8217;s accounting to tell a memory kill from a stop request that timed out. The Atlas notes that with the newer resource accounting version, an out-of-memory kill can also reflect pressure across the whole host. That is why it suggests a running count of memory kills for every thousand container-days, rather than case-by-case reactions.<\/p>\n<h2>Why a runbook mattered more than a hero<\/h2>\n<p>The client did not want an expert on call forever. What they wanted was for the next person to inherit a clear sequence of checks. The team wrote one page with the five symptoms above, the command used to read each signal, and the agreed fix. They also added an owner&#8217;s name for the image, since the Atlas observes that images without an owner quietly age. Two months later a contractor followed the page to resolve a restart problem on a second site without asking anyone a question.<\/p>\n<h2>What this has to do with page design<\/h2>\n<p>Web builders spend a great deal of effort on how a page looks and converts. Our posts on <a href=\"https:\/\/www.cmsgalaxy.com\/blog\/turning-clicks-into-clients-the-power-of-effective-service-pages\/\">how service pages turn visitors into clients<\/a> and <a href=\"https:\/\/www.cmsgalaxy.com\/blog\/the-importance-of-the-about-us-page-in-building-online-trust\/\">why an About Us page builds trust<\/a> are about earning confidence. A site that drops visitors during every deploy undoes that work, so container behaviour belongs in the same conversation as page copy.<\/p>\n<h2>The diagnosis as a quick checklist<\/h2>\n<ul>\n<li>If deploys end with exit 137, check the form of the start command and signal handling.<\/li>\n<li>If speed dips in bursts, look at the throttle ratio before blaming the application.<\/li>\n<li>If the disk fills, look at log rotation.<\/li>\n<li>If a service is reachable from outside, check how its ports are published.<\/li>\n<li>If environments disagree, compare digests rather than tags.<\/li>\n<\/ul>\n<h2>Closing thoughts<\/h2>\n<p>None of these problems was exotic, and none needed new software. They needed someone to treat the container as a thing worth operating, not merely a box the CMS happened to live in. The Atlas&#8217;s maturity ladder is a handy yardstick: the team started near the bottom, with laptop-style builds and floating tags, and the five fixes moved them to the point where digests, limits and non-root settings were in place. The next Monday ticket was about a typo on a pricing page, which everyone agreed was a much better kind of ticket.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A web team traces slow restarts, throttling, a full disk and exposed ports to container habits, and fixes each one. A problem and solution walk-through.<\/p>\n","protected":false},"author":14,"featured_media":6271,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1455],"tags":[],"class_list":["post-6270","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-development"],"_links":{"self":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/6270","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/comments?post=6270"}],"version-history":[{"count":1,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/6270\/revisions"}],"predecessor-version":[{"id":6388,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/6270\/revisions\/6388"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/media\/6271"}],"wp:attachment":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/media?parent=6270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/categories?post=6270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/tags?post=6270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}