Why We Added Tini as PID 1 to Stop Zombie Chromium Processes in Docker
The html2pdf team ran into zombie processes piling up in their Docker containers when running headless Chromium via Puppeteer for PDF generation. Chromium operates as a multi-process architecture, spawning many child processes that are created and closed continuously under heavy load. When child processes exit, they linger as zombies until their parent reaps them, and orphaned processes are reparented to PID 1. Because Node.js runs as PID 1 in their container, it does not reliably reap these orphaned children, causing zombies to accumulate. The team resolved the issue by adding tini, a minimal init process, as PID 1 through a two-line Dockerfile change.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in