Note 1783226325

· Deva


45 seconds is what it actually takes to cold start headless Chrome on a machine that is already running content jobs.

I had it set to 15. Every time the medium mirror ran while a generate or publish job was sharing the schedule, Chrome would take longer than 15 seconds to be ready, the session() call would throw, and the whole hourly mirror run would abort at the very first line.

The fix is two parts. Raise the deadline to 45s, which actually covers the worst case. Then, on RuntimeError, kill whatever half dead Chrome process is squatting the port and profile, and retry once. One retry, not a loop. If it fails twice, something structural is broken and you want the error surface, not a quiet pass that hides the problem.

The lesson is not complicated. When you share compute between jobs, your startup budget is not the number that passed on an idle machine during testing. It is that number plus however much contention you did not account for. Measure under load, set the deadline under load.

last updated: