Clearing Stuck Job Queue Records After an Apex Timeout

Last updated: August 18, 2026

Overview

During policy renewal, amplo runs a background Apex job called JobQueueRunner to create renewal policies from their original records. If a large batch of renewals fires at once, individual job steps can time out and get stuck instead of completing. When that happens, job queue records stall in a Pending, In Progress, or Ready state, and the org starts generating repeated Apex timeout error emails until the stuck records are cleared.

Identify stuck queue records

To identify a stuck job queue record, look for one or both of the following:

  • An Apex error or exception email referencing a failed queueable job due to an Apex timeout error.

  • A failed JobQueueRunner Apex job in Setup, under Apex Jobs.

Clear stuck records

To resolve this, upgrade to amplo 2.13 or later. This release automatically restarts the job queue on a set schedule, so it picks up pending jobs without manual intervention.

Clear stuck records (Salesforce Managed Package 2.12 and earlier)

Build a report of stuck records

  1. Navigate to Reports and click New Report.

Untitled design - 2026-08-18T133127.824.png
  1. Select All under category. Then, search and select Job Queue.

Untitled design - 2026-08-18T133411.717.png
  1. Click Start Report.

Untitled design - 2026-08-18T133504.605.png
  1. Add the following filters:

    1. Show me: All job queue

    2. Job queue created date: All time

    3. Job subtype: AI-Relink

    4. Status: In Progress, Pending, or Ready

  2. Click Save & Run.

Untitled design - 2026-08-18T135051.529.png

Clear the records

  1. Enable inline field editing on the report.

Untitled design - 2026-08-18T135434.653.png
  1. Change the status of each stuck AI-Relink record to Complete.

Untitled design - 2026-08-18T141823.525.png
  1. Save your changes.

Restart the job queue

  1. Open any written policy.

  2. Click the System tab.

  3. Click Restart Job Queue.

Untitled design - 2026-08-18T142847.282.png

Confirm the records cleared

  1. Refresh the report. Cleared records drop off the list.

  2. If new AI-Relink jobs appear — this can happen when the backlog is large — repeat the clear and restart steps until the report is empty.