Webhook Delivery Retry Sweep
Webhook Delivery Retry Sweep
Introduced in v0.1.253
Overview
The platform automatically retries failed webhook deliveries on a scheduled sweep, ensuring transient network errors or downstream outages do not permanently break your webhook integrations without intervention.
How It Works
A background job runs on a 15-minute cron schedule (*/15 * * * *). On each run it:
-
Scans the
webhook_deliveriestable for records matching all of the following conditions:status = 'failed'nextRetryAt <= NOW()attempts < 5
-
Re-queues a
webhook/deliverevent for each matching delivery, scheduling it for immediate retry. -
Marks permanent failures — once a delivery has reached 5 failed attempts, it is marked as permanently failed and will no longer be retried.
-
Notifies admins — when a delivery is permanently failed, an error notification is inserted for all organisation admins so the issue can be investigated.
Retry Schedule
| Attempt | Triggered by |
|---|---|
| 1 | Original delivery attempt |
| 2–5 | Automated retry sweep (every 15 min, when nextRetryAt is due) |
| > 5 | No further retries — permanent failure recorded |
The
nextRetryAtfield on each delivery record controls the earliest time a retry will be attempted. This allows exponential or fixed back-off strategies to be implemented at the point of failure recording.
Admin Notifications
When a webhook delivery is permanently failed (5 attempts exhausted), an entry is inserted into the notifications table targeting all org_members with an admin role for the relevant organisation. Admins should:
- Review the failing webhook endpoint for availability or configuration issues.
- Check the delivery logs for the HTTP error returned.
- Re-enable or re-send the webhook manually once the issue is resolved.
Affected Data Entities
| Entity | Role |
|---|---|
webhook_deliveries | Source of truth for delivery status, attempt count, and retry timing |
webhooks | Parent configuration for each delivery |
notifications | Destination for permanent-failure admin alerts |
org_members | Used to identify admin recipients for failure notifications |