Retries & Dead Letter Queue

Failed DB trigger executions are automatically retried with exponential backoff. After 5 failures, events move to the Dead Letter Queue where you can inspect, replay, or dismiss them.

Retry schedule

When a trigger execution fails, it is automatically queued for retry. The retry worker runs every 30 seconds and processes due retries:

Attempt 1Immediately
Attempt 21 minute after failure1 min
Attempt 32 minutes after attempt 22 min
Attempt 44 minutes after attempt 34 min
Attempt 58 minutes after attempt 48 min
Final (attempt 6)16 minutes after attempt 516 min

After 6 attempts

If all 5 retries are exhausted (6 total attempts including the original), the event is moved to the Dead Letter Queue. It will not be retried again automatically.

What gets retried

Only DB trigger executions are retried. HTTP invocations are not — the caller receives the error response directly and can retry from the Flutter app if needed.

A trigger execution is considered failed when the function throws an uncaught exception, exceeds the timeout, or the Deno process exits with a non-zero status.

Dead Letter Queue

The DLQ is a holding area for events that permanently failed. Each DLQ entry shows the function name, event type, collection, number of attempts, last error message, and when it failed.

Access the DLQ from the dashboard: Functions → select a function → Dead Letters tab.

Replay

Re-enqueues the event into the retry queue. The function will attempt execution again, starting from attempt 1 with the original payload.

Dismiss

Permanently removes the event from the DLQ. Use when the event is stale, the payload was invalid, or the failure is expected.

Oversized payloads

If a trigger payload exceeds 512KB, it cannot be stored in the retry queue. Instead it is sent directly to the DLQ with the error message "payload too large for retry queue" and a truncated version of the original payload. The original data is not stored.

Monitoring failures

The Dead Letters tab badge shows the current DLQ count. Auto-refreshes every 15 seconds. The Triggers tab shows a colour-coded success rate bar and failure count per trigger for the last 24 hours.

Design functions to be idempotent

Because failed triggers are retried, your function may execute more than once for the same event. Design your functions to be idempotent — running the same function twice with the same payload should produce the same result without unintended side effects (e.g. sending duplicate emails or double-charging a card).