Apex Governor Limits Explorer
Search every Apex limit — synchronous and asynchronous side by side — and check whether your loop will break before you deploy it.
SOQL queries issued
Limits.getQueries()Each parent-child subquery counts as an extra query (limit: 3× the top-level limit). Custom metadata type queries don’t count.Sync100
Async200
Records retrieved by SOQL queries
Limits.getQueryRows()Limit50,000
same
Records retrieved by Database.getQueryLocator
Limits.getQueryLocatorRows()Limit10,000
same
SOSL queries issued
Limits.getSoslQueries()Limit20
same
Records retrieved by a single SOSL query
Limit2,000
same
DML statements issued
Limits.getDmlStatements()Includes insert, update, upsert, delete, undelete, merge, Database.* versions, convertLead, emptyRecycleBin, rollback, setSavepoint, Approval.process, System.runAs and EventBus.publish (publish after commit).Limit150
same
Records processed by DML, Approval.process or emptyRecycleBin
Limits.getDmlRows()Limit10,000
same
Stack depth for recursive trigger firing (insert, update, delete)
Limit16
same
Callouts (HTTP requests or web service calls)
Limits.getCallouts()Limit100
same
Cumulative timeout for all callouts
Limit120 seconds
same
@future method calls
Limits.getFutureCalls()Sync50
Async0 in batch and future; 50 in queueable
Jobs added to the queue with System.enqueueJob
Limits.getQueueableJobs()Sync50
Async1
sendEmail method calls
Limits.getEmailInvocations()Limit10
same
Total heap size
Limits.getHeapSize()Email services: 50 MB. Callout request and response sizes count toward heap.Sync10 MB
Async25 MB
CPU time on the Salesforce servers
Limits.getCpuTime()Time spent in the database for SOQL/DML and waiting for callouts isn’t counted.Sync10,000 ms
Async60,000 ms
Execution time for each Apex transaction
Limit10 minutes
same
Push notification method calls
Limit10
same
Push notifications sent per push notification method call
Limit2,000
same
EventBus.publish calls (platform events that publish immediately)
Limits.getPublishImmediateDML()Limit150
same
Rows across all Apex cursors
Limit50 million
same
Cursor.fetch calls
Limit100
same
Asynchronous Apex executions per 24 hours (batch, future, queueable, scheduled)
Check what’s left with OrgLimits.getMap() or the REST limits resource (DailyAsyncApexExecutions).
Limit250,000 or 200 × user licenses, whichever is greater
same
Apex classes scheduled at the same time
Limit100 (Developer Edition: 5)
same
Batch jobs in the flex queue in Holding status
Limit100
same
Batch jobs queued or active at the same time
Limit5
same
Batch job start methods running at the same time
Limit1
same
Concurrent long-running (5 s+) synchronous transactions
Limit1 per 100 licenses, minimum 10, maximum 50
same
Apex cursor instances per 24 hours
Limit10,000
same
Batch jobs submitted in a running test
Limit5
same
Default callout timeout
Limit10 seconds
same
Callout request or response size
Sync6 MB
Async12 MB
SOQL query run time before the transaction is cancelled
Limit120 seconds
same
Trigger batch size
Platform event and Change Data Capture triggers: 2,000.
Limit200
same
SOQL for-loop list batch size
Limit200
same
Records returned by a Batch Apex Database.QueryLocator
Limit50 million
same
Classes and triggers in one deployment
Limit7,500
same
Characters in a class
Limit1 million
same
Characters in a trigger
Limit1 million
same
Apex code in an org
Limit6 MB
same
Method size
Limit65,535 bytecode instructions (compiled)
same
From the Apex Developer Guide (Winter ’27): Execution Governors and Limits — checked 22 October 2026. Scheduled Apex uses the synchronous limits.
Will my code hit a limit?
Describe one loop over your records — e.g. a trigger handling 200 records.
- SOQL queries1 / 100
- DML statements1 / 150
- Records changed by DML200 / 10,000
Breaks above 10,000 records.
- Callouts0 / 100
Runs in your browser — nothing you paste is sent to us or stored.
How to use it
- 1
Search a limit
Type heap, CPU, SOQL, callout or batch — or pick a group. Synchronous and asynchronous values sit side by side.
- 2
Describe your loop
How many records, and how many queries, DML statements and callouts run inside and outside the loop.
- 3
See where it breaks
Each limit shows how much you use, the record count where it fails and how to fix it.
Questions
What are Apex governor limits?
Salesforce runs every org on shared servers, so it caps what one Apex transaction can do — how many queries, DML statements, callouts, how much memory (heap) and CPU time. Going over a limit throws a System.LimitException that can’t be caught, and the whole transaction rolls back.
What’s the difference between synchronous and asynchronous limits?
Asynchronous Apex — Batch Apex, Queueable and @future methods — gets higher limits for a few resources: 200 SOQL queries instead of 100, 25 MB heap instead of 10 MB and 60 seconds of CPU instead of 10 (Winter ’27). Most other limits are the same. Scheduled Apex runs with the synchronous limits.
Why does a query inside a loop break?
A trigger receives up to 200 records at a time. One query per record is 200 queries — over the synchronous limit of 100. Query once before the loop (WHERE Id IN :ids), keep the results in a Map, and do one DML statement on a List after the loop.
Do Batch Apex limits reset?
Yes — each execute() call of a batch job is its own transaction with fresh limits, which is why batch is the answer for large volumes. The org-wide limits still apply: 250,000 asynchronous executions per 24 hours (or 200 × user licenses, whichever is greater) and 5 batch jobs queued or active at once.
How do I check limits while my code runs?
The Limits class reports usage in the current transaction — Limits.getQueries() against Limits.getLimitQueries(), Limits.getHeapSize(), Limits.getCpuTime() and so on. For org-wide limits such as daily async executions, use OrgLimits.getMap() or the REST API limits resource.
How current are these numbers?
They come from the Apex Developer Guide for Winter ’27 (API 68.0), and the page shows the date we last checked. Salesforce does raise limits from time to time — the heap limits in this release are higher than the long-familiar 6 MB and 12 MB.
Further reading
Want to go beyond the tools?
Learn Salesforce development — live classes with people who build on Salesforce every day.