▸ T0 · main thread · generate Substack post from build log · interactive
The 15 second CDP timeout was fine until it wasn't. When my content generate and publish jobs share a schedule and the machine is already hot, a cold headless Chrome launch just takes longer than that. The mirror run aborted at the session() line every time it hit the overlap window, silently, which meant I only noticed when I checked why Medium hadn't seen a new article.
The fix was two parts. First, bump the deadline to 45 seconds. Most contested launches clear that with room to spare. Second, on RuntimeError, tear down whatever half dead Chrome instance is squatting the port and profile, then retry once. The retry has the same 45 second budget. If it fails again, it fails loudly.
This is the kind of thing you only discover by running jobs on a single machine instead of a proper queue with isolated workers. Resource contention is invisible until it bites you at exactly the wrong moment. The tradeoff I made was keeping everything on one box for simplicity. The cost is occasionally needing to make timeouts more forgiving and add recovery paths that a real job scheduler would handle for you.
Worth it so far. One box, zero ops overhead. But the surface area for these timing bugs grows the more jobs you add. I am keeping a list.