<@U04S8PLJWMT> Is there a way to set an alert for ...
# ask-ai
j
@kapa.ai Is there a way to set an alert for pipelines stalling or taking longer than usual to run?
k
Yes. There are a couple of options in Airbyte to alert you when syncs stall or behave abnormally: 1. Use built‑in notifications on sync completion/failure Airbyte can send notifications per workspace on several events, including: - Failed syncs - Successful syncs - Warning – Repeated Failures - Sync Disabled – Repeated Failures - Various connection updates and upgrade‑related events Notifications can be delivered via email (Cloud only) or webhook (Cloud and Self‑Managed).[[Manage notifications](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/manage-airbyte-cloud-notifications)] You can wire the webhook to Slack or another system to get alerted when syncs fail or when Airbyte is about to/has disabled a sync because of repeated failures (which often indicates something is “stuck”).[[Webhook payloads](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/manage-airbyte-cloud-notifications#set-up-webhook-notifications)] 2. Webhook payloads for long‑running/hanging jobs For each sync attempt, the webhook payload includes: -
startedAt
,
finishedAt
-
durationInSeconds
,
durationFormatted
-
success
flag -
errorType
,
errorOrigin
(for failures) Example for a failed sync webhook:[[Webhook payloads](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/manage-airbyte-cloud-notifications#set-up-webhook-notifications)]
Copy code
json    {      "data": {        "workspace": {...},        "connection": {...},        "jobId": 9988,        "startedAt": "2024-01-01T00:00:00Z",        "finishedAt": "2024-01-01T01:00:00Z",        "success": false,        "durationInSeconds": 3600,        "durationFormatted": "1 hours 0 min"      }    }
You can use these fields in your webhook receiver to implement your own logic, for example: - Compare
durationInSeconds
to historical averages and alert if it’s unusually high. - Alert when multiple failed syncs occur in a row for the same connection (in addition to the built‑in “repeated failures” events). 3. Platform‑level safeguards against hanging jobs Airbyte has internal mechanisms that detect when a sync is “stuck” and will eventually fail it, which in turn can trigger your failure notifications: - Source heartbeats: If the source stops emitting
RECORD
or
STATE
messages for longer than
heartbeat-max-seconds-between-messages
(default 3 hours), the sync is failed with “The source is unresponsive.”[[Heartbeats](https://docs.airbyte.com/platform/understanding-airbyte/heartbeats#technical-details)] - Destination timeout: If a call to the destination exceeds
destination-timeout-max-seconds
(default 24 hours), the sync is failed with “The destination is unresponsive.”[[Heartbeats](https://docs.airbyte.com/platform/understanding-airbyte/heartbeats#technical-details)] Both are configurable in
flags.yaml
and, when they cause a failure, you can be notified via the same notification system. 4. Global job timeout (older versions) In older forum posts, support mentions
SYNC_JOB_MAX_TIMEOUT_DAYS
(minimum 1 day) to forcefully time out very long‑running jobs:[[Sync timeout env var](https://discuss.airbyte.io/t/709)]
Copy code
env    SYNC_JOB_MAX_TIMEOUT_DAYS=3
The knowledge sources don’t document a more granular hours‑level timeout, only this days‑level setting and the heartbeat/timeout mechanisms above. --- So while there isn’t a built‑in “alert when this specific sync exceeds X minutes” toggle in the docs, you can: - Enable Failed syncs and repeated‑failure notifications (email or webhook). - Use the webhook payload to implement your own “slower than usual” or “appears stalled” logic in whatever monitoring/alerting system you use.
Yes. Airbyte has built‑in notification mechanisms you can use to detect stalled or unusually long pipelines: 1. Use Airbyte notifications (Cloud and Self‑Managed) You can configure per‑workspace notifications via email (Cloud only) or generic webhooks. Supported events include: - Failed syncs - Warning – Repeated Failures - Sync Disabled – Repeated Failures These don’t directly say “job is slow,” but they alert you when jobs repeatedly fail or get disabled, which often correlates with stuck or problematic pipelines. [[Manage notifications](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/manage-airbyte-cloud-notifications)] For webhooks, Airbyte sends detailed payloads on each failed or successful sync (workspace, connection, timing, bytes, records, error info). You can consume these in your own system and define “slow” or “stalled” based on
durationInSeconds
, or by detecting missing completions within an expected time window. [[Set up webhook](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/manage-airbyte-cloud-notifications#set-up-webhook-notifications)] 2. Use heartbeat / timeout signals (Self‑Managed) For self‑managed deployments, Airbyte has internal heartbeat and timeout logic: - Source heartbeat: If no
RECORD
or
STATE
messages are seen for longer than
heartbeat-max-seconds-between-messages
(default 3 hours), Airbyte fails the sync with “The source is unresponsive.” [[Heartbeats](https://docs.airbyte.com/platform/understanding-airbyte/heartbeats#technical-details)] - Destination timeout: If a call to the destination exceeds
destination-timeout-max-seconds
(default 24 hours), Airbyte treats the destination as timed out and (by default) fails the sync with “The destination is unresponsive.” [[Heartbeats](https://docs.airbyte.com/platform/understanding-airbyte/heartbeats#technical-details)] Once these failures occur, your existing Failed sync webhook/email notifications will fire, which you can treat as alerts for “stalled” pipelines. [[Manage notifications](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/manage-airbyte-cloud-notifications)] 3. Job‑level max runtime (Self‑Managed) There is also an environment variable
SYNC_JOB_MAX_TIMEOUT_DAYS
(minimum 1 day) that force‑terminates very long‑running jobs. It’s coarse‑grained (days, not hours), but can act as a safety net so jobs don’t run indefinitely. [[K8s timeout thread](https://discuss.airbyte.io/t/709); [Connector runtime thread](https://discuss.airbyte.io/t/1037)] 4. Downstream monitoring with webhooks Because webhook payloads include start/end times and success/failure, you can: - Trigger alerts if no Success or Failed webhook arrives for a connection within X minutes of its schedule. - Trigger alerts when
durationInSeconds
exceeds a threshold you define as “unusually long.” [[Set up webhook](https://docs.airbyte.com/platform/cloud/managing-airbyte-cloud/manage-airbyte-cloud-notifications#set-up-webhook-notifications)] If you need fine‑grained “this specific sync has exceeded N minutes” alerts, that logic must currently be implemented in your own monitoring system consuming Airbyte’s webhooks; the docs do not describe a native per‑connection “max runtime in minutes/hours” alerting feature beyond the mechanisms above.
j
How does powered by airbyte work in terms of pricing? we self-host and are wondering if we could do the same with a headless stack.