Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview
On this page

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/client already retries queued writes and live queries on this code.
  • In a luna, check e.retryable on the LunaCallError and call again, or send a message with ctx.send, which Luna retries for you.
  • If the luna keeps answering Unavailable after crashes, find the crash with luna logs --event crash.

Was this page helpful?