Storing a value sometimes fails
We are using Windows all the way around, specifically Windows Server 2008 Web Edition, 64-bit. Our client uses Enyim.
Most of the time when we store a value using the Store method, the value stores successfully (true is returned from the method call). Occasionally, however, a value that should store successfully does not (false is returned).
I can put a break point in my code to break when the value fails to store, then try again, and it fails, then try again, and it fails, and then perhaps on the 4th or 5th time it succeeds, and then I can let execution of the code continuing and storing is then successful for awhile.
Sometimes (even more infrequently), storing the value will continually fail (when I try over and over by stepping through the code).
Why is this happening?
Under what conditions would storing a value fail?
What is the best pattern to follow when storing a value if it fails, have a retry loop of some kind to retry for up to a number of seconds or something?