Loading
Slack製品の問い合わせ先はSalesforce Helpへ統合・変更されます続きを読む

How to Troubleshoot Slow Asynchronous Apex Jobs in Salesforce

公開日: Oct 11, 2026
説明

Asynchronous jobs in Salesforce, including Apex batch jobs, future methods, queueable Apex, and scheduled Apex, can sometimes take longer to complete than expected. This can be caused by governor limits, code inefficiency, large data volumes, external system callouts, or resource contention from other concurrent processes. This article walks through how to diagnose the most common causes of async job delays.

解決策

This article answers why an asynchronous Apex job (batch, future method, queueable, or scheduled Apex) is running slower than expected in Salesforce, and gives the steps to diagnose the most common causes. Use the steps below to find the cause.

Diagnostics

  1. Check the Apex Jobs page: Go to Setup (the gear icon in the top right, then select Setup), then in the Quick Find box, type Apex Jobs and select it. Review the status and details of your async jobs.
  2. Review the Debug Logs: Go to Setup, then in the Quick Find box, type Debug Logs and select it. Set up a trace flag for the user or class running the async job to capture detailed execution logs.

Governor Limits and Code Efficiency

  1. Analyze governor limits: Async jobs are subject to Apex governor limits. Check if your code is hitting limits like CPU time, heap size, or SOQL queries, which can cause delays or failures.
  2. Examine batch size: If using Batch Apex, evaluate the batch size. A very small batch size can lead to more context switches and overhead, while a very large batch size might hit governor limits.
  3. Consider large data volumes: Processing a very large number of records can naturally take more time. Optimize SOQL queries and DML operations for large data sets.

External and Concurrent Factors

  1. Look for external system callouts: If your async job makes callouts to external systems, network latency or issues with the external system can cause significant delays.
  2. Identify concurrent processes: High volumes of other automated processes (workflows, flows, other Apex triggers or jobs) running concurrently can consume shared resources and slow down async jobs.
  3. Check for database row locks: Operations on the same records by multiple processes can lead to row locking, causing async jobs to wait.
ナレッジ記事番号

005390942

 
読み込み中
Salesforce Help | Article