Skip to content
Salesforce Dictionary - Free Salesforce GlossarySalesforce Dictionary
More from the dictionary
Reference

Salesforce governor limits

Governor limits are the per-transaction caps Salesforce enforces on every Apex execution, so one tenant's code cannot starve the others on shared servers. Each limit covers the whole transaction, including every trigger, flow and class it runs. Bookmark this page; pair it with the governor limits dictionary entry for the deeper context.

CategoryLimitSyncAsync
SOQLTotal SOQL queries100200
SOQLRecords returned by SOQL50,00050,000
SOQLTotal SOSL queries2020
SOQLRecords retrieved by Database.getQueryLocator10,00010,000
DMLTotal DML statements150150
DMLRecords processed by DML10,00010,000
CPUMaximum CPU time on Salesforce servers10,000 ms60,000 ms
HeapMaximum heap size6 MB12 MB
CalloutsTotal callouts (HTTP requests or web service calls)100100
CalloutsMaximum cumulative timeout for all callouts in a transaction120 sec120 sec
EmailSingle emails sent (SingleEmailMessage)1010
EmailMass emails sent (MassEmailMessage)1010
Push notificationsMobile push notifications1010
ApexTotal stack depth for Apex invocations1,0001,000
ApexFuture calls per Apex invocation5050
ApexQueueable jobs added with System.enqueueJob501
ApexMaximum number of Apex jobs added to the queue with System.enqueueJob5,000 / 24h5,000 / 24h

Numbers reflect Spring ‘26 release. Salesforce occasionally raises soft caps - always check the official Apex Developer Guide for the canonical value.

The governor limit errors you will actually hit

For the bulkification patterns that keep you under every limit, read the Salesforce governor limits cheat sheet, or browse the full Salesforce error library.

Governor limits FAQ

What are Salesforce governor limits?
Per-transaction limits Salesforce enforces on every Apex execution. Each script runs in a multi-tenant context, so governor limits prevent any one process from monopolising shared resources (CPU, memory, database).
Do governor limits reset between triggers?
No. Limits accumulate across the entire transaction, including all triggers, Flows, and Apex called within that single user request. Bulk-test in a sandbox before assuming you have headroom.
How is async (Batch / Queueable) different?
Async contexts get higher CPU (60s vs 10s), heap (12 MB vs 6 MB), and queue limits but the same SOQL/DML caps. For very large jobs, switch to Batch Apex which loops over chunks of up to 200 records.
What is the SOQL query limit in Salesforce?
100 SOQL queries per synchronous transaction and 200 in asynchronous Apex such as Batch, Queueable and future methods. Across the transaction, queries can return at most 50,000 rows.
How do I check governor limits in Apex?
Use the Limits class. Limits.getQueries() returns the SOQL queries used so far and Limits.getLimitQueries() returns the cap; the same pair exists for DML statements, CPU time and heap size.