Developer fixes silent headless Chrome crashes with longer timeout and retry logic
A developer running an hourly headless Chrome mirror job on macOS found that cold launches were silently failing on busy mornings when the machine was already handling CPU- and memory-intensive content jobs. The default 15-second startup deadline proved insufficient under load, causing the entire mirror run to abort without any retry or recovery. The fix involved two changes: raising the launch timeout to 45 seconds to cover realistic worst-case startup times, and adding a single recovery retry that kills any zombie Chrome process left from a previous failed session before attempting relaunch. Without the cleanup step, the retry would simply collide with the same lingering process and fail again. The developer noted the approach is intentionally simple given the job runs once an hour, and flagged that a dedicated context manager would be a cleaner long-term refactor.
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