{
  "id": 3226189,
  "title": "One Dead Container Stopped nginx From Starting At All",
  "url": "https://urgent.news/2026/08/25/one-dead-container-stopped-nginx-from-starting-at-all",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-25T08:35:05.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/srdjan_poppovic/one-dead-container-stopped-nginx-from-starting-at-all-44h2"
  },
  "original_language": "en",
  "account": "One container failure brought down an entire nginx setup. The issue arose when one container stopped, causing nginx to fail in starting up. All other services ran smoothly, but the host could not be found in the upstream importer. This singular container malfunction had a cascading effect, halting the frontend, API, and tile server. The root cause was nginx caching DNS, which failed to adapt to the container's changing IP address upon restart. To resolve this problem, one must defer the DNS resolution to request time, allowing nginx to handle missing containers as a 502 error for its respective route. A crucial aspect of the fix involves defining the address in a variable and providing nginx with a resolver. The resolver should use Docker's embedded DNS server and should not attempt to resolve IPv6 addresses. However, this fix introduces two additional complications: the trailing slash issue and the if statement within the rewrite module. These issues could lead to unexpected URI handling and CORS errors, respectively. To avoid these problems, it is essential to use the correct ordering of directives within the rewrite module and ensure that the CORS preflight is correctly implemented.",
  "summary": "Eight containers behind one nginx. One of them was stopped. nginx would not start. Not \"returned 502 for that service\" — would not start, at all, with every other service running fine: host not found in upstream \"importer\" That is one dead background service taking down the entire public entry point: the frontend, the API, the tile server, all of it. This is a short post about why, the three-line…",
  "key_points": [
    "One container failure caused nginx to fail starting up",
    "Nginx caching DNS couldn't adapt to container's changing IP",
    "Fix involves deferring DNS resolution, using Docker's embedded DNS"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}