Back to feed
Dev.to
Dev.to
7/4/2026
My headless Chrome mirror kept dying on busy mornings. Here is the fix.

My headless Chrome mirror kept dying on busy mornings. Here is the fix.

Short summary

Headless Chrome startup times exceed 15-second timeout when competing with CPU-intensive content jobs on shared infrastructure. Solution: raise timeout to 45 seconds and add single-shot retry with process cleanup to handle zombie Chrome processes. Acceptable trade-off for hourly background jobs; user-facing flows would require persistent Chrome sockets instead.

  • Cold Chrome launches on busy systems need 45-second deadline, not 15 seconds, to clear realistic worst-case startup windows
  • Add single-retry recovery with process cleanup to handle zombie Chrome processes blocking ports or profile directories
  • Design trade-off: acceptable for background jobs, but user-facing flows should keep Chrome warm with persistent connections

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more