Replay Fails Intermittently¶
Replay succeeds sometimes and fails other times with the same test case and the same configuration. This is genuinely tricky to debug, precisely because you can't rely on consistent behavior. The cause is almost never the test case. It's usually the server, the network, or a race condition that surfaces under specific timing.
Root Causes¶
The server itself may have intermittent problems (database timeouts, race conditions, resource exhaustion). The network may be unstable. The replay may sometimes exceed the session timeout threshold by just enough to trigger expiration. Or the server may simply behave differently depending on whatever background load it happens to be under at the moment.
If it's the test case, the failure would be consistent. Intermittency points elsewhere.
Diagnostic Steps¶
Step 1: Run replay multiple times¶
- Run the same replay 5-10 times in a row
- Track which transactions fail:
- Same transaction every time? Configuration issue, not intermittent. Go to Debugging Failed Replays.
- Different transactions each time? Genuine intermittency. Continue here.
- Note the failure rate: 10%? 50%? 90%? The rate tells you something about the underlying cause.
Step 2: Check server logs¶
- Review server logs during failed replays (timestamps from the Errors View help you correlate)
- Look for: Database errors, timeouts, exceptions, resource warnings
- Coordinate with development/operations to investigate server-side issues
Solutions¶
Solution 1: Test for Session Timeout¶
If failures correlate with replay duration (longer replays fail more), the session is probably timing out:
- Replay in Play Fast mode (removes think time, so the whole replay completes in seconds)
- If Play Fast succeeds consistently: Session timeout is the problem
- Fix: Configure shorter think times for the replay, or add re-login logic for long load tests
Solution 2: Coordinate with Development¶
If the failures are server-side:
- Document the intermittent failures: HTTP status codes, error messages, timestamps
- Provide server logs and request details from Headers View
- Development team investigates server-side race conditions, resource limits, database issues
Intermittent failures are valuable findings. They reveal production-readiness issues that should be fixed before deployment. If your server can't handle one virtual user reliably, it has a problem worth knowing about before you scale to a thousand.