In most cases it is reasonable to stop attempting transaction replays after a certain number of failed attempts. This prevents transactions from being repeatedly replayed on the same server over and over again if, for example, it keeps crashing.