# Salesforce Governor Limits Reference

> Apex governor limits for Salesforce Winter '27 (API 68.0). Checked against the official docs on 2026-11-17.

Source: [Apex Developer Guide: Execution Governors and Limits](https://developer.salesforce.com/docs/platform/apex-dev/references/apex-dev/apex-gov-limits.html)
Page: https://sfdxtalk.com/tools/governor-limits/

## Which limit did I hit?

| Error message | Limit exceeded |
| --- | --- |
| `Too many SOQL queries: 101` | 100 SOQL queries per synchronous transaction (200 asynchronous) |
| `Too many query rows: 50001` | 50,000 records retrieved by SOQL queries per transaction |
| `Too many DML statements: 151` | 150 DML statements per transaction |
| `Too many DML rows: 10001` | 10,000 records processed by DML per transaction |
| `Apex CPU time limit exceeded` | 10,000 ms CPU time synchronous (60,000 ms asynchronous) |
| `Apex heap size too large` | 10 MB heap synchronous (25 MB asynchronous) |
| `Too many callouts: 101` | 100 callouts per transaction |
| `Too many future calls: 51` | 50 future method calls per Apex invocation |
| `Too many Queueable jobs added to the queue: 51` | 50 System.enqueueJob calls per synchronous transaction (1 asynchronous) |
| `Too many SOSL queries: 21` | 20 SOSL queries per transaction |
| `Too many Email Invocations: 11` | 10 sendEmail calls per transaction |
| `Maximum trigger depth exceeded` | Trigger stack depth of 16 |

## Per-transaction Apex limits

These limits count for each Apex transaction. For Batch Apex they reset for each execute call. Where a row shows one value, it applies to both synchronous and asynchronous Apex. Scheduled Apex is asynchronous, but synchronous limits apply to it.

| Limit | Synchronous | Asynchronous |
| --- | --- | --- |
| Total number of SOQL queries issued | 100 | 200 |
| Total number of records retrieved by SOQL queries | 50,000 | 50,000 |
| Total number of records retrieved by Database.getQueryLocator | 10,000 | 10,000 |
| Total number of SOSL queries issued | 20 | 20 |
| Total number of records retrieved by a single SOSL query | 2,000 | 2,000 |
| Total number of DML statements issued | 150 | 150 |
| Total number of records processed as a result of DML statements, Approval.process, or database.emptyRecycleBin | 10,000 | 10,000 |
| Total stack depth for any Apex invocation that recursively fires triggers due to insert, update, or delete statements | 16 | 16 |
| Total number of callouts (HTTP requests or web services calls) in a transaction | 100 | 100 |
| Maximum cumulative timeout for all callouts (HTTP requests or Web services calls) in a transaction | 120 seconds | 120 seconds |
| Maximum number of methods with the future annotation allowed per Apex invocation | 50 | 0 in batch and future contexts; 50 in queueable context |
| Maximum number of Apex jobs added to the queue with System.enqueueJob | 50 | 1 |
| Total number of sendEmail methods allowed | 10 | 10 |
| Total heap size | 10 MB | 25 MB |
| Maximum CPU time on the Salesforce servers | 10,000 milliseconds | 60,000 milliseconds |
| Maximum execution time for each Apex transaction | 10 minutes | 10 minutes |
| Maximum number of push notification method calls allowed per Apex transaction | 10 | 10 |
| Maximum number of push notifications that can be sent in each push notification method call | 2,000 | 2,000 |
| Maximum number of EventBus.publish calls for platform events configured to publish immediately | 150 | 150 |
| Maximum number of rows across all Apex cursors per transaction | 50 million | 50 million |
| Maximum number of Cursor.fetch calls per transaction | 100 | 100 |
| Maximum number of rows across all Apex pagination cursors per transaction | 100,000 | 100,000 |
| Maximum number of Apex pagination cursor instances per transaction | 50 | 50 |
| Maximum number of rows retrieved per page from an Apex pagination cursor | 2000 | 2000 |

## Certified managed package cumulative limits

Certified managed packages (AppExchange security-reviewed) get their own per-namespace limits. Across all namespaces in one transaction the cumulative limit is 11 times the per-namespace limit. Heap, CPU time, execution time and the number of unique namespaces are shared by the whole transaction.

| Limit | Value |
| --- | --- |
| Total number of SOQL queries issued | 1,100 |
| Total number of records retrieved by Database.getQueryLocator | 110,000 |
| Total number of SOSL queries issued | 220 |
| Total number of DML statements issued | 1,650 |
| Total number of callouts (HTTP requests or web services calls) in a transaction | 1,100 |
| Total number of sendEmail methods allowed | 110 |

## Salesforce Platform Apex limits

These limits are enforced by the platform, not per Apex transaction.

| Limit | Value |
| --- | --- |
| Asynchronous Apex method executions per 24-hour period (batch, future, Queueable and scheduled Apex) | 250,000 or the number of applicable user licenses in your org multiplied by 200, whichever is greater |
| Batch, Queueable and future method executions that can be enqueued in 24 hours, including elastic executions processed at a throttled rate (beta) | The org's daily asynchronous Apex method executions limit plus either the org's licensed daily asynchronous Apex method executions limit or 2 million executions, whichever is less |
| Maximum number of Apex cursor instances per 24-hour period | 10,000 |
| Maximum cumulative number of new cursor rows and pagination cursor rows per 24-hour period | 100 million |
| Maximum number of Apex pagination cursor instances per 24-hour period | 200,000 |
| Synchronous concurrent transactions for long-running transactions that last longer than 5 seconds for each org | Based on the number of applicable licenses; a ratio of 100 licenses to one concurrent long-running Apex transaction. Minimum limit is 10. Maximum limit is 50 |
| Maximum number of Apex classes scheduled concurrently | 100. In Developer Edition orgs, the limit is 5 |
| Maximum number of batch Apex jobs in the Apex flex queue that are in Holding status | 100 |
| Maximum number of batch Apex jobs queued or active concurrently | 5 |
| Maximum number of batch Apex job start method concurrent executions | 1 |
| Maximum number of batch jobs that can be submitted in a running test | 5 |
| Maximum number of test classes that can be queued per 24-hour period (production orgs other than Developer Edition) | The greater of 500 or 10 multiplied by the number of test classes in the org |
| Maximum number of test classes that can be queued per 24-hour period (sandbox and Developer Edition orgs) | The greater of 500 or 20 multiplied by the number of test classes in the org |

## Static Apex limits

Fixed values that do not vary by transaction type.

| Limit | Value |
| --- | --- |
| Default timeout of callouts (HTTP requests or Web services calls) in a transaction | 10 seconds |
| Maximum size of callout request or response (HTTP request or Web services call) | 6 MB for synchronous Apex or 12 MB for asynchronous Apex |
| Maximum SOQL query run time before Salesforce cancels the transaction | 120 seconds |
| Maximum number of class and trigger code units in a deployment of Apex | 7500 |
| Apex trigger batch size | 200 |
| For loop list batch size | 200 |
| Maximum number of records returned for a Batch Apex query in Database.QueryLocator | 50 million |

## Size-specific Apex limits

Limits on the size of Apex code.

| Limit | Value |
| --- | --- |
| Maximum number of characters for a class | 1 million |
| Maximum number of characters for a trigger | 1 million |
| Maximum amount of code used by all Apex code in an org | 6 MB |
| Method size limit | 65,535 bytecode instructions in compiled form |
