{
  "id": 3212628,
  "title": "Why Your Self-Hosted Stirling-PDF Container OOMs, Hangs or Returns a Broken PDF: 15 Anti-Patterns and Their Fixes",
  "url": "https://urgent.news/2026/08/25/why-your-self-hosted-stirling-pdf-container-ooms-hangs-or-returns-a",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-25T07:06:47.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/john_182319291/why-your-self-hosted-stirling-pdf-container-ooms-hangs-or-returns-a-broken-pdf-15-anti-patterns-4db2"
  },
  "original_language": "en",
  "account": "This article outlines fifteen common mistakes that lead to Stirling-PDF containers running out of memory (OOM), hanging or producing broken PDFs. The key culprits are:\n\n1. Lack of a container memory limit\n2. Not setting a Java heap size ceiling inside the container\n3. Using the wrong image variant\n4. Calling tools the container does not contain\n\nFor a typical home user with limited PDFs, a lightweight image with a hard 1GB container limit prevents most issues. More extensive setups need a full image, mounted language packs, and processing smaller batches to avoid OCR slowdowns. Automation builders should implement queues and timeout limits, while teams sharing an instance must budget for LibreOffice serialization.\n\nThree failure types are distinguished by checking the exit code and container logs: OOM kills, OutOfMemoryErrors, and timeouts. Correcting the underlying issue requires setting appropriate memory limits, heap sizes, and timeouts. Diagnosing the wrong root cause wastes time.",
  "summary": "Stirling-PDF is not an unstable application. Almost every crash, hang and quietly mangled output traces back to one of fifteen decisions you made outside the app: an unbounded container, the wrong image variant, a reverse proxy that gives up after 60 seconds, or an OCR call with no language pack behind it. The Java process inside the container claims a default heap of 25 percent of visible RAM,…",
  "key_points": [
    "Lack of container memory limit causes OOM",
    "Not setting Java heap size ceiling leads to crashes",
    "Wrong image variant results in broken PDFs"
  ],
  "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."
}