ETLMCPData Conveyance Works
Log in Start free
Docs

Retries and how long etlmcp waits

When etlmcp runs a failed sync again by itself, how long it waits between attempts, which failures it never retries, and when to press Run yourself.

When a sync fails for a reason that can clear up on its own, such as a network drop or a platform that is limiting requests, etlmcp runs it again without you doing anything. One run gets 3 attempts, the first one included. Before the second attempt it waits at least 60 seconds, and before the third at least 300 seconds. If the platform says how long to wait and that is longer, etlmcp waits that long instead, but never more than 3 hours for one wait. A failure that a retry cannot fix, such as a login that needs reconnecting, ends the run at once. While a run is queued for another attempt, you do not need to press Run now again.

Two kinds of failure

Transient errors are retried. These often pass by themselves:

  • the platform is rate limiting requests, or answers with a server error or a reply that cannot be parsed at all;
  • the network fails between etlmcp and the platform or your destination; a network failure that no more specific message covers shows network error while contacting the service;
  • etlmcp's own database is briefly out of reach: database temporarily unavailable;
  • a destination reports a problem that it marks as temporary;
  • anything etlmcp did not expect and could not place: unexpected error.

Permanent errors are not retried. The run ends straight away and the message tells you what to fix:

  • the platform rejected the login, so the platform needs reconnecting;
  • the ad account is no longer accessible to the connected login;
  • the source or destination was deleted or switched off;
  • a transform rule cannot be applied to the rows;
  • the destination's host is not allowed, or the destination rejected the data in a way it marks as final;
  • the platform's rows could not be read into etlmcp's columns, shown as source returned unreadable data, or the platform refused the request with an error that retrying cannot change;
  • a bug in etlmcp itself, shown as internal error.

What you see while a retry waits

Between attempts the run goes back to the queued status. Its error field reads retrying: {…}, with the reason from the failed attempt in place of the braces. The run's attempts field counts the attempts made so far. You can read both with Get a run in the REST API or with the get_run tool over MCP.

A pipeline has at most one run queued or running at a time. If you press Run now on the pipeline's page in the dashboard while a retry is waiting, you get a sync is already running for this pipeline. Let the waiting run finish instead.

Runs that use the same platform login take turns, because they share that login's rate limits. A run waiting for its next attempt does not hold the others up: another pipeline on the same login can run in the meantime.

Waits inside one attempt

Before a whole attempt fails, the connector already retries single requests to the platform, backing off between tries and following the platform's own wait time when it gives one. Only when those tries run out, or the platform asks for a longer wait than one attempt allows, does the attempt fail and the run-level wait above begin. The platform's requested wait is carried over to that run-level wait.

Waits that use no attempt

Two kinds of wait are not failures, so they do not use up any of the 3 attempts:

  • Not enough room in memory. When other large syncs are holding the memory a sync needs, the run is put off, either before etlmcp asks the platform for anything or just before delivery. It goes back to queued, shows waiting for other large syncs to end and starts again on its own after a short pause.
  • A worker shutting down. When the worker running a sync is stopped, for example during a deploy, the run goes back to queued with the error retrying: the server restarted, and a worker picks it up again shortly after. This happens before delivery begins, and during delivery only to a destination where delivering again replaces the rows. A delivery that would be made twice, such as a webhook's, is not handed back. A job that has been taken up many times is not handed back any more, so it cannot circle the queue for ever.

When the last attempt fails

If the final attempt fails, or a permanent error comes up, the run ends. Its status is partial when it failed while delivering to your destination, which means the pulled rows were already stored in etlmcp, and failed when it broke earlier.

Each owner of the organization then gets an email about the failing pipeline. Owners are written to at most once per pipeline per UTC day, and an organization's owners hear about at most 20 pipelines a day. Waiting retries never send email. When etlmcp has already told the owners about the cause, such as a login that needs reconnecting or an ad account that was lost, the failed run sends no second email.

When to press Run again

  • The run is queued with a retrying: error: no. It will try again by itself.
  • It ended with a transient error: yes, you can start it again from the dashboard, with Start a run, or with run_pipeline. Or leave it: the next scheduled sync pulls its trailing window again, which covers the recent days a failed scheduled sync missed. A failed run over an older range you picked is not repeated by the schedule.
  • It ended with a permanent error: fix what the message names first, such as reconnecting the platform or correcting a rule. Pressing Run now before that fails the same way.

Related