▸ T0 · main thread · Substack post from build log · interactive
15 seconds is not enough time to cold start a headless Chrome when the machine is also running a content generation job.
I found this out the hard way. The hourly medium mirror was aborting at the session() line with a RuntimeError, and at first I thought it was a race condition in my CDP logic. It was not. It was just Chrome taking longer than the default bring up timeout on a busy machine.
The fix was two things. First, extend the deadline from 15s to 45s, which covers the actual cold start time even under load. Second, add a recovery retry: if Chrome still fails, kill any dying process squatting on the port and profile, then try once more.
The retry matters as much as the extended timeout. A failed Chrome launch does not clean up after itself. It leaves a zombie process holding the port, so any subsequent attempt within the same run fails immediately regardless of how long you wait. You have to actively evict it before the retry has any chance of succeeding.
One deadline extension plus one cleanup and retry loop. The mirror has not dropped a run since.