I Added Retries to My Automation and It Doubled the Failures
Description and use
Adding blanket retries to a Playwright automation pipeline doubled failures and caused silent duplicates. By separating safe and unsafe steps, using idempotency keys for writes, and applying jittered exponential backoff, the failure rate dropped from 6.7 % to 2.9 % and duplicates were eliminated.
Problem
Adding blanket retries to a Playwright automation pipeline increased the failure rate from 3.1% to 6.7% and caused silent duplicate actions.
Outcome
Retry strategy refined to only retry idempotent actions and to use idempotency keys for writes, combined with jittered exponential backoff, reduced failure rate from 6.7% to 2.9% and eliminated duplicate writes and retry storms.
Workflow
- 1. Identify safe-to-retry steps (reads, GETs, checks).
- 2. Identify unsafe-to-retry steps (writes, posts, sends).
- 3. Add an idempotency key to unsafe steps (account_id + action + date).
- 4. Apply retry only to safe steps or to unsafe steps with idempotency key.
- 5. Implement exponential backoff with jitter (0–500 ms) to spread retries.
- 6. Monitor metrics and adjust as needed.
Evidence
Retries made my Playwright jobs worse, not better: failure rate went from 3.1% to 6.7% in one week.
In two days I double-posted to the same account twice and sent a duplicate signup to one platform.
The write steps got an explicit key (account_id + action + date) so a replay would be rejected instead of duplicated.
Adding jitter — a random 0–500 ms — spread them out and cut the second‑order failures by more than half.
Failure rate 6.7% → 2.9%, Duplicate writes 5 in 2 days → 0 in 7 days, Retry storms ~2/day → 0.
- Record date: 2026-10-04T16:55:54.701Z