Unavailable
The luna could not run the call right now, and the call never started, so a retry is safe.
Unavailable means the luna could not take the call right now, and the call never started. The status is 503.
Issue
A call fails with Unavailable. In a luna, the LunaCallError has retryable: true.
A common message is restarting after a crash (in <N> ms).
Cause
The luna was briefly unable to run:
- It crashed a moment ago, and waits before it starts again. The wait grows with each crash, up to 30 seconds.
- It was moving, starting or stopping, and the call arrived in between.
- Its storage could not be reached.
None of these ran your handler, so none of its writes happened.
Unavailable differs from OutcomeUnknown. After OutcomeUnknown, the call may have run. After Unavailable, it did not. It also differs from Quarantined, which does not pass with time.
Solution
Retry after a short pause that grows with each attempt. The call never started, so a retry runs it once.
- The client in
luna/clientalready retries queued writes and live queries on this code. - In a luna, check
e.retryableon theLunaCallErrorand call again, or send a message withctx.send, which Luna retries for you. - If the luna keeps answering
Unavailableafter crashes, find the crash withluna logs--event crash.