Skip to main content

Automatic Execution Retry

Integration executions can fail due to temporary issues like network timeouts or brief third-party service outages. Automatic retry allows your integrations to attempt execution again after a failure, improving reliability without manual intervention.

Integration retry configuration​

You can configure your asynchronously-invoked instances to retry if they fail to run to completion. This is especially useful if your integration relies on an unreliable third-party API that may experience brief outages. By enabling retry, your integration can attempt execution again after a short delay, reducing unnecessary alerting and manual intervention.

To enable automatic retry, select your trigger and then choose Flow retry.

Set integration to retry in Prismatic app

Retry Attempts specifies the maximum number of times (up to 10) Prismatic will attempt to run the same instance invocation after a failure. If the number of failures exceeds Retry Attempts, the execution is marked as failed and any configured alert monitors will fire.

Minutes Between Attempts sets the interval (in minutes) between retry attempts. For example, if set to 4 minutes and the first attempt fails at 10:24, subsequent attempts will occur at 10:28, 10:32, 10:36, 10:40, and 10:44 if failures persist.

Note: Retry intervals are precise to the minute (not the second). Thus, a retry scheduled for 4 minutes after a failure at 10:24 may occur at 10:28 or 10:29.

If Exponential Backoff is enabled, the interval between retries increases exponentially (factor of 2). For example, with Minutes Between Attempts set to 3 and Exponential Backoff enabled, retries will occur after 3, 6, 12, 24, and 48 minutes.

Note: The maximum delay before a retry is 24 hours. If exponential backoff would result in a longer delay, the retry will occur after 24 hours instead.

Retry Cancellation allows you to cancel pending retries if a more recent invocation occurs. For example, if your integration processes payloads with unique IDs, you may want to cancel retries for older invocations when new data arrives, preventing outdated data from overwriting newer updates.

To configure retry cancellation, select a unique request ID from the trigger payload. For example, you might pass in a header, x-my-unique-id: abc123 as part of your trigger payload. If another invocation with that header comes in that updates resource abc123, you might want to cancel currently queued retries. To do that, select your trigger's results.headers.results.headers.x-my-unique-id reference as your Unique Cancellation ID.

Cancellation IDs do not need to be headers. Instead, you can select a key from the payload body. For example, if your instance invocation looks like this:

curl 'https://hooks.prismatic.io/trigger/EXAMPLE==' \
--location \
--header "Content-Type: application/json" \
--data '{"productId":"abc123","price":"250","description":"A box of widgets"}'

You can key your unique cancellation ID off of results.body.data.productId.

Retrying failed batches in large data syncs​

A flow that uses batching (a large data sync) splits the records its trigger returns into batches, and each batch runs the flow's steps separately. When retry is enabled on a batched flow, Prismatic applies your retry settings to each batch instead of to the whole execution. If a batch fails, Prismatic re-runs only that batch, with the same records, as part of the same execution. Other batches keep processing while the failed batch waits for its next attempt, so one transient error doesn't cost you the rest of a long sync.

Batch retry is opt-in. If retry isn't enabled for the flow, a failed batch is marked as failed and isn't retried.

Configuring batch retry​

Configure batch retry in the same place as any other flow retry. In the low-code designer, select your trigger and open its Flow retry tab. In a code-native integration, add a retryConfig to your flow (see retrying failed batches in code-native integrations).

Flow retry tab for a batched trigger, with Retry attempts set to 3 and Minutes between attempts set to 5

Batched flows support fewer attempts and shorter delays than other flows:

SettingFlows without batchingBatched flows
Retry attemptsUp to 10Up to 3
Minutes between attemptsUp to 60Up to 15
Longest delay with Exponential backoff24 hours15 minutes

When batching is enabled on the trigger's Flow control tab, the designer offers only values within the batched limits. Prismatic rejects an integration import that sets higher values on a batched flow.

Which failures are retried​

Prismatic retries a batch when:

  • A step in the batch throws an error that isn't handled by the step's error handling.
  • The runner processing the batch stops before it reports a result (for example, because it ran out of memory).
  • The trigger fails while fetching a page of records. The retry fetches the page that failed, rather than starting over from the first page.

A retry re-runs every record in the batch, including records that were processed before the error occurred. Design your flow's steps so that processing the same record twice is safe - for example, by upserting records rather than inserting them.

Batch retries don't run when you test a flow from the integration designer, and they stop if you cancel the execution's batch processing.

What happens when a batch runs out of retries​

An execution doesn't finish while any of its batches are waiting to retry. If a retry succeeds, the batch counts as completed. If a batch fails on every attempt, Prismatic marks it as failed and continues processing the execution's other batches. After all batches finish, the execution is marked as failed if any batch ran out of retries.

Because each batch has its own retries, Prismatic doesn't also retry the whole execution of a batched flow.

If your batches have a high rate of errors, Prismatic slows down the execution, running fewer batches at once, until the error rate diminishes. This gives a struggling third-party system a chance to recover instead of receiving a flood of retries.

Viewing batch retries​

Open an execution of a batched flow to see its batches. The Last Retry Attempt and Last Retry Status columns show whether each batch was retried and how its most recent attempt ended. Select a batch to see its Retry attempts, including each attempt's status, duration, and error. While an execution is running, its progress summary shows how many batches are waiting to retry.

For more information, see Instance retry and replay.