Quarantined
One luna crashed too often in a short time, so Luna holds it back and refuses calls to it.
Quarantined means one luna crashed too often, and Luna now refuses every call to it. The status is 503.
Issue
Calls to one luna fail with Quarantined, while other lunas of the same type answer. The message counts the crashes and gives the last reason.
crashed 5 times in 600 s; last: <REASON>
Cause
When a luna crashes, Luna starts it again on its next call, after a pause that grows with each crash. A luna that crashes 5 times within 10 minutes is held back instead. Only crashes caused by the luna’s own code count.
The luna’s stored data is safe. What it had not stored when it crashed is lost, as with any crash.
Quarantined differs from Unavailable. An Unavailable luna is restarting and answers again soon. A quarantined luna stays refused, so retrying does not help.
Solution
Find out why the luna crashes, then fix the code.
- Run
luna logs<TYPE> --event crash --key <KEY>to read each crash and its reason. - Look for a handler that keeps its thread busy without awaiting, or data that makes it fail the same way every time.
- Deploy the fix, so that other lunas of the type do not crash the same way.
- Let the luna out with
luna data release<TYPE> <KEY>. It wakes and carries on with the work it had waiting.