{"id":173,"date":"2022-11-15T00:24:25","date_gmt":"2022-11-14T19:24:25","guid":{"rendered":"http:\/\/doozyspot.com\/?p=173"},"modified":"2022-11-15T00:24:31","modified_gmt":"2022-11-14T19:24:31","slug":"salesforce-governor-limits-apex-platform-event-and-callout","status":"publish","type":"post","link":"https:\/\/doozyspot.com\/?p=173","title":{"rendered":"Salesforce Governor Limits &#8211; Apex, Platform, Event and callout"},"content":{"rendered":"\n<p>Due to the nature of multitenancy and the fact we are sharing resources, governor limits are in place to ensure that all resources are allocated as expected to each.<\/p>\n\n\n\n<p>There are different types of governor limits <\/p>\n\n\n\n<p><strong>Per-Transaction Apex Limits<\/strong>: These limits count for each Apex transaction. For Batch Apex, these limits are reset for each execution of a batch of records in the execute method.<\/p>\n\n\n\n<p><strong>Per Transaction Certified Managed Package Limits<\/strong>: If a managed package developed by a Salesforce ISV has passed security review, they are provided with generally higher per-transaction limits.<\/p>\n\n\n\n<p><strong>Lightning Platform Apex Limit<\/strong>: These limits aren\u2019t specific to an Apex Transaction and are enforced by the Lightning platform.<\/p>\n\n\n\n<p><strong>Static Apex Limit<\/strong>: Apex Limits that are applied across all transactions.<\/p>\n\n\n\n<p><strong>Size-Specific Apex Limit<\/strong>: Apex Limits related to the size of code.<\/p>\n\n\n\n<p><strong>Miscellaneous Apex Limit<\/strong>: Other Limits!<\/p>\n\n\n\n<p><strong>Email Limits<\/strong><\/p>\n\n\n\n<p><strong>Push Notification Limits<\/strong><\/p>\n\n\n\n<p><strong>Flow Limits<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong><span style=\"text-decoration: underline;\">Per-Transaction Apex Limits:<\/span><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Description<\/th><th>Synchronous Limit<\/th><th>Asynchronous Limit<\/th><\/tr><\/thead><tbody><tr><td><a><\/a>Total number of SOQL queries issued<sup>1<\/sup><\/td><td><a><\/a>100<\/td><td><a><\/a>200<\/td><\/tr><tr><td><a><\/a>Total number of records retrieved by SOQL queries<\/td><td><a><\/a>50,000<\/td><td><a><\/a>50,000<\/td><\/tr><tr><td><a><\/a>Total number of records retrieved by&nbsp;<samp>Database.getQueryLocator<\/samp><\/td><td><a><\/a>10,000<\/td><td><a><\/a>10,000<\/td><\/tr><tr><td><a><\/a>Total number of SOSL queries issued<\/td><td><a><\/a>20<\/td><td><a><\/a>20<\/td><\/tr><tr><td><a><\/a>Total number of records retrieved by a single SOSL query<\/td><td><a><\/a>2,000<\/td><td><a><\/a>2,000<\/td><\/tr><tr><td><a><\/a>Total number of DML statements issued<sup>2<\/sup><\/td><td><a><\/a>150<\/td><td><a><\/a>150<\/td><\/tr><tr><td><a><\/a>Total number of records processed as a result of DML statements,&nbsp;<samp>Approval.process<\/samp>, or&nbsp;<samp>database.emptyRecycleBin<\/samp><\/td><td><a><\/a>10,000<\/td><td><a><\/a>10,000<\/td><\/tr><tr><td>Total stack depth for any Apex invocation that recursively fires triggers due to&nbsp;<samp>insert<\/samp>,&nbsp;<samp>update<\/samp>, or&nbsp;<samp>delete<\/samp>&nbsp;statements<sup>3<\/sup><\/td><td><a><\/a>16<\/td><td><a><\/a>16<\/td><\/tr><tr><td><a><\/a>Total number of callouts (HTTP requests or web services calls) in a transaction<\/td><td><a><\/a>100<\/td><td><a><\/a>100<\/td><\/tr><tr><td>Maximum cumulative timeout for all callouts (HTTP requests or Web services calls) in a transaction<\/td><td><a><\/a>120 seconds<\/td><td><a><\/a>120 seconds<\/td><\/tr><tr><td><a><\/a>Maximum number of methods with the&nbsp;<samp>future<\/samp>&nbsp;annotation allowed per Apex invocation<\/td><td><a><\/a>50<\/td><td><a><\/a>0 in batch and future contexts; 50 in queueable context<\/td><\/tr><tr><td><a><\/a>Maximum number of Apex jobs added to the queue with&nbsp;<samp>System.enqueueJob<\/samp><\/td><td><a><\/a>50<\/td><td><a><\/a>1<\/td><\/tr><tr><td><a><\/a>Total number of&nbsp;<samp>sendEmail<\/samp>&nbsp;methods allowed<\/td><td><a><\/a>10<\/td><td><a><\/a>10<\/td><\/tr><tr><td><a><\/a>Total heap size<sup>4<\/sup><\/td><td><a><\/a>6 MB<\/td><td><a><\/a>12 MB<\/td><\/tr><tr><td><a><\/a>Maximum CPU time on the Salesforce servers<sup>5<\/sup><\/td><td><a><\/a>10,000 milliseconds<\/td><td><a><\/a>60,000 milliseconds<\/td><\/tr><tr><td>Maximum execution time for each Apex transaction<\/td><td><a><\/a>10 minutes<\/td><td><a><\/a>10 minutes<\/td><\/tr><tr><td>Maximum number of push notification method calls allowed per Apex transaction<\/td><td><a><\/a>10<\/td><td><a><\/a>10<\/td><\/tr><tr><td>Maximum number of push notifications that can be sent in each push notification method call<\/td><td><a><\/a>2,000<\/td><td><a><\/a>2,000<\/td><\/tr><tr><td>Maximum number of&nbsp;<samp>EventBus.publish<\/samp>&nbsp;calls for platform events configured to publish immediately<\/td><td>150<\/td><td>150<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><sup>1<\/sup>\u00a0In a SOQL query with parent-child relationship subqueries, each parent-child relationship counts as an extra query. These types of queries have a limit of three times the number for top-level queries. The limit for subqueries corresponds to the value that\u00a0<samp>Limits.getLimitAggregateQueries()<\/samp>\u00a0returns. The row counts from these relationship queries contribute to the row counts of the overall code execution. This limit doesn\u2019t apply to custom metadata types. In a single Apex transaction, custom metadata records can have unlimited SOQL queries. In addition to static SOQL statements, calls to the following methods count against the number of SOQL statements issued in a request.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Per-Transaction Certified Managed Package Limits<\/h2>\n\n\n\n<p id=\"d4955e80-d4968e573\"><a><\/a>Certified managed packages\u2014managed packages that have passed the security review for AppExchange\u2014get their own set of limits for most per-transaction limits. Salesforce ISV Partners develop certified managed packages, which are installed in your org from AppExchange and have unique namespaces.<\/p>\n\n\n\n<p id=\"d4955e80-d4968e576\">Here\u2019s an example that illustrates the separate certified managed package limits for DML statements. If you install a certified managed package, all the Apex code in that package gets its own 150 DML statements. These DML statements are in addition to the 150 DML statements your org\u2019s native code can execute. This limit increase means more than 150 DML statements can execute during a single transaction if code from the managed package and your native org both executes. Similarly, the certified managed package gets its own 100-SOQL-query limit for synchronous Apex, in addition to the org\u2019s native code limit of 100 SOQL queries.<\/p>\n\n\n\n<p id=\"d4955e80-d4968e595\">This table lists the cumulative cross-namespace limits.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Description<\/th><th>Cumulative Cross-Namespace Limit<\/th><\/tr><\/thead><tbody><tr><td>Total number of SOQL queries issued<\/td><td>1,100<\/td><\/tr><tr><td>Total number of records retrieved by&nbsp;<samp>Database.getQueryLocator<\/samp><\/td><td>110,000<\/td><\/tr><tr><td>Total number of SOSL queries issued<\/td><td>220<\/td><\/tr><tr><td>Total number of DML statements issued<\/td><td>1,650<\/td><\/tr><tr><td>Total number of callouts (HTTP requests or web services calls) in a transaction<\/td><td>1,100<\/td><\/tr><tr><td>Total number of&nbsp;<samp>sendEmail<\/samp>&nbsp;methods allowed<\/td><td>110<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Lightning Platform Apex Limits<\/h2>\n\n\n\n<p id=\"d4955e82-d4968e724\"><a><\/a>The limits in this table aren&#8217;t specific to an Apex transaction; Lightning Platform enforces these limits.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Description<\/th><th>Limit<\/th><\/tr><\/thead><tbody><tr><td><a><\/a>The maximum number of asynchronous Apex method executions (batch Apex, future methods, Queueable Apex, and scheduled Apex) per a 24-hour period<sup>1<\/sup><sup>,<\/sup><sup>6<\/sup><\/td><td><a><\/a>250,000&nbsp;or the number of user licenses in your org multiplied by 200, whichever is greater<\/td><\/tr><tr><td>Number of synchronous concurrent transactions for long-running transactions that last longer than 5 seconds for each org.<sup>2<\/sup><\/td><td>10<\/td><\/tr><tr><td>Maximum number of Apex classes scheduled concurrently<\/td><td>100. In Developer Edition orgs, the limit is 5.<\/td><\/tr><tr><td>Maximum number of batch Apex jobs in the Apex flex queue that are in&nbsp;<samp>Holding<\/samp>&nbsp;status<\/td><td><a><\/a>100<\/td><\/tr><tr><td>Maximum number of batch Apex jobs queued or active concurrently<sup>3<\/sup><\/td><td><a><\/a>5<\/td><\/tr><tr><td>Maximum number of batch Apex job&nbsp;<samp>start<\/samp>&nbsp;method concurrent executions<sup>4<\/sup><\/td><td>1<\/td><\/tr><tr><td>Maximum number of batch jobs that can be submitted in a running test<\/td><td><a><\/a>5<\/td><\/tr><tr><td>Maximum number of test classes that can be queued per 24-hour period (production orgs other than Developer Edition)<sup>5<\/sup><sup>,<\/sup><sup>6<\/sup><\/td><td>The greater of&nbsp;<a><\/a>500 or 10 multiplied by the number of test classes in the org<\/td><\/tr><tr><td>Maximum number of test classes that can be queued per 24-hour period (sandbox and Developer Edition orgs)<sup>5<\/sup><sup>,<\/sup><sup>6<\/sup><\/td><td>The greater of&nbsp;<a><\/a>500 or 20 multiplied by the number of test classes in the org<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Static Apex Limits<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Description<\/th><th>Limit<\/th><\/tr><\/thead><tbody><tr><td>Default timeout of callouts (HTTP requests or Web services calls) in a transaction<\/td><td><a><\/a>10 seconds<\/td><\/tr><tr><td>Maximum size of callout request or response (HTTP request or Web services call)<sup>1<\/sup><\/td><td><a><\/a>6 MB for synchronous Apex or 12 MB for asynchronous Apex<\/td><\/tr><tr><td>Maximum SOQL query run time before Salesforce cancels the transaction<\/td><td>120 seconds<\/td><\/tr><tr><td>Maximum number of class and trigger code units in a deployment of Apex<\/td><td>7500<\/td><\/tr><tr><td>Apex trigger batch size<sup>2<\/sup><\/td><td>200<\/td><\/tr><tr><td>For loop list batch size<\/td><td><a><\/a>200<\/td><\/tr><tr><td>Maximum number of records returned for a Batch Apex query in&nbsp;<samp>Database.QueryLocator<\/samp><\/td><td>50 million<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p id=\"d4955e85-d4968e1053\"><a><\/a><sup>1<\/sup>&nbsp;<a><\/a>The HTTP request and response sizes count towards the total heap size.<\/p>\n\n\n\n<p id=\"d4955e85-d4968e1060\"><sup>2<\/sup>\u00a0The Apex trigger batch size for platform events and Change Data Capture events is 2,000.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Size-Specific Apex Limits<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Description<\/th><th>Limit<\/th><\/tr><\/thead><tbody><tr><td>Maximum number of characters for a class<\/td><td><a><\/a>1 million<\/td><\/tr><tr><td>Maximum number of characters for a trigger<\/td><td><a><\/a>1 million<\/td><\/tr><tr><td>Maximum amount of code used by all Apex code in an org<sup>1<\/sup><\/td><td>6 MB<\/td><\/tr><tr><td>Method size limit<sup>2<\/sup><\/td><td>65,535 bytecode instructions in compiled form<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p id=\"d4955e87-d4968e1141\"><a><\/a><sup>1<\/sup>&nbsp;This limit doesn\u2019t apply to Apex code in first generation(1GP) or second generation(2GP) managed packages. The code in those types of packages belongs to a namespace unique from the code in your org. This limit also doesn\u2019t apply to any code included in a class defined with the&nbsp;<a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/apex_classes_annotation_isTest.htm\"><samp>@isTest<\/samp>&nbsp;annotation<\/a>.<\/p>\n\n\n\n<p id=\"d4955e87-d4968e1151\"><sup>2<\/sup>\u00a0Large methods that exceed the allowed limit cause an exception to be thrown during the execution of your code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Miscellaneous Apex Limits<\/h2>\n\n\n\n<p>Connect in ApexFor classes in the&nbsp;<samp>ConnectApi<\/samp>&nbsp;namespace, every write operation costs one DML statement against the Apex governor limit.&nbsp;<samp>ConnectApi<\/samp>&nbsp;method calls are also subject to rate limiting.&nbsp;<samp>ConnectApi<\/samp>&nbsp;rate limits match Connect REST API rate limits. Both have a per user, per namespace, per hour rate limit. When you exceed the rate limit, a&nbsp;<samp>ConnectApi.RateLimitException<\/samp>&nbsp;is thrown. Your Apex code must catch and handle this exception.Data.com CleanIf you use the Data.com Clean product and its automated jobs, consider how you use Apex triggers. If you have Apex triggers on account, contact, or lead records that run SOQL queries, the SOQL queries can interfere with Clean jobs for those objects. Your Apex triggers (combined) must not exceed 200 SOQL queries per batch. If they do, your Clean job for that object fails. In addition, if your triggers call&nbsp;<samp>future<\/samp>&nbsp;methods, they\u2019re subject to a limit of 10&nbsp;<samp>future<\/samp>&nbsp;calls per batch.Event ReportsThe maximum number of records that an event report returns for a user who isn\u2019t a system administrator is 20,000; for system administrators, 100,000.MAX_DML_ROWS limit in Apex testingThe maximum number of rows that can be inserted, updated, or deleted, in a single, synchronous Apex test execution context, is limited to 450,000. For example, an Apex class can have 45 methods that insert 10,000 rows each. If the limit is reached, you see this error:&nbsp;<samp>Your runallTests&nbsp;is&nbsp;consuming too many DB resources<\/samp>.SOQL Query PerformanceFor best performance, SOQL queries must be selective, particularly for queries inside triggers. To avoid long execution times, the system can terminate nonselective SOQL queries. Developers receive an error message when a non-selective query in a trigger executes against an object that contains more than 200,000 records. To avoid this error, ensure that the query is selective. See&nbsp;<a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.240.0.apexcode.meta\/apexcode\/langCon_apex_SOQL_VLSQ.htm\" target=\"_blank\" rel=\"noreferrer noopener\">More Efficient SOQL Queries<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Email Limits<\/h2>\n\n\n\n<p>Inbound Email Limits<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Email Services: Maximum Number of Email Messages Processed(Includes limit for On-Demand Email-to-Case)<\/td><td>Number of user licenses multiplied by&nbsp;<a><\/a>1,000; maximum 1,000,000<\/td><\/tr><tr><td>Email Services: Maximum Size of Email Message (Body and Attachments)<\/td><td>25 MB<sup>1<\/sup><\/td><\/tr><tr><td>On-Demand Email-to-Case: Maximum Email Attachment Size<\/td><td>25 MB<\/td><\/tr><tr><td>On-Demand Email-to-Case: Maximum Number of Email Messages Processed(Counts toward limit for Email Services)<\/td><td>Number of user licenses multiplied by 1,000; maximum 1,000,000<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><sup>1<\/sup>&nbsp;The maximum size of email messages for Email Services varies depending on character set and transfer encoding of the body parts. The size of an email message includes the email headers, body, attachments, and encoding. As a result, an email with a 35-MB attachment likely exceeds the 25-MB size limit for an email message after accounting for the headers, body, and encoding.<\/p>\n\n\n\n<p><a><\/a>When defining email services, note the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An email service only processes messages it receives at one of its addresses.<\/li>\n\n\n\n<li><a><\/a>Salesforce limits the total number of messages that all email services combined, including On-Demand Email-to-Case, can process daily. Messages that exceed this limit are bounced, discarded, or queued for processing the next day, depending on how you configure the&nbsp;<a href=\"https:\/\/help.salesforce.com\/apex\/HTViewHelpDoc?id=code_email_services_editing.htm&amp;language=en_US#FailureResponseSettings\">failure response settings<\/a>&nbsp;for each email service.&nbsp;<a><\/a>Salesforce calculates the limit by multiplying the number of user licenses by 1,000; maximum 1,000,000. For example, if you have 10 licenses, your org can process up to 10,000 email messages a day.<\/li>\n\n\n\n<li>Email service addresses that you create in your sandbox can\u2019t be copied to your production org.<\/li>\n\n\n\n<li>For each email service, you can tell Salesforce to send error email messages to a specified address instead of the sender&#8217;s email address.<\/li>\n\n\n\n<li><a><\/a>Email services reject email messages and notify the sender if the email (combined body text, body HTML, and attachments) exceeds approximately&nbsp;<a><\/a>25 MB&nbsp;(<a><\/a>varies depending on language and character set).<\/li>\n<\/ul>\n\n\n\n<p>Outbound Email: Limits for Single and Mass Email Sent Using Apex<\/p>\n\n\n\n<p><a><\/a>Each licensed org can send single emails to a maximum of 5,000 external email addresses per day&nbsp;based on Greenwich Mean Time (GMT).&nbsp;<a><\/a>For orgs created before Spring \u201919, the daily limit is enforced only for emails sent via Apex and Salesforce APIs except for REST API. For orgs created in Spring \u201919 and later, the daily limit is also enforced for email alerts, simple email actions, Send Email actions in flows, and REST API. If one of the newly counted emails can\u2019t be sent because your org has reached the limit, we notify you by email and add an entry to the debug logs.&nbsp;<a><\/a>Single emails sent using the email author or composer in Salesforce don&#8217;t count toward this limit.&nbsp;<a><\/a>There\u2019s no limit on sending single emails to contacts, leads, person accounts, and users in your org directly from account, contact, lead, opportunity, case, campaign, or custom object pages.&nbsp;<a><\/a>In Developer Edition orgs and orgs evaluating Salesforce during a trial period, you can send to a maximum of&nbsp;<a><\/a>50&nbsp;recipients per day, and each single email can have up to 15 recipients..<\/p>\n\n\n\n<p>Keep these considerations in mind when sending emails:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a><\/a>When sending single emails, you can specify up to&nbsp;<a><\/a>150&nbsp;recipients across the&nbsp;To,&nbsp;CC, and&nbsp;BCC&nbsp;fields in each&nbsp;SingleEmailMessage. Each field is also limited to&nbsp;<a><\/a>4,000 bytes.<\/li>\n\n\n\n<li><a><\/a>If you use&nbsp;SingleEmailMessage&nbsp;to email your org\u2019s internal users, specifying the user\u2019s ID in&nbsp;setTargetObjectId&nbsp;means the email doesn\u2019t count toward the daily limit. However, specifying internal users\u2019 email addresses in&nbsp;setToAddresses&nbsp;means the email does count toward the limit.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can send mass email and list email to a maximum of 5,000 external email addresses per day per licensed Salesforce org. A day is calculated based on Greenwich Mean Time (GMT).<\/li>\n\n\n\n<li>The single email, mass email, and list email limits count duplicate email addresses. For example, if you have&nbsp;johndoe@example.com&nbsp;in your email 10 times that counts as 10 against the limit.<\/li>\n\n\n\n<li>API or Apex single emails can be sent to a maximum of 5,000 external email addresses per day.<\/li>\n\n\n\n<li>You can send an unlimited amount of email through the UI to your org\u2019s internal users, which include portal users.<\/li>\n\n\n\n<li>You can send mass emails and list emails only to contacts, person accounts, leads, and your org\u2019s internal users.<\/li>\n\n\n\n<li>In Developer Edition orgs and orgs evaluating Salesforce during a trial period, you can send to no more than 10 external email recipients per org per day using mass email and list email.<\/li>\n\n\n\n<li>You can\u2019t send mass email using a Visualforce email template.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"d4955e93-d4968e1418\"><a><\/a>Push Notification Limits<\/h2>\n\n\n\n<p>An org can send up to 20,000 iOS and 10,000 Android push notifications per hour (for example, 4:00 to 4:59 UTC).<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Asynchronous Callout Limits<\/h1>\n\n\n\n<p>When a continuation is executing, the continuation-specific limits apply. When the continuation returns and the request resumes, a new Apex transaction starts. All Apex and Visualforce limits apply and are reset in the new transaction, including the Apex callout limits.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Continuation-Specific Limits<\/h2>\n\n\n\n<p>The following are Apex and Visualforce limits that are specific to a continuation.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Description<\/th><th>Limit<\/th><\/tr><\/thead><tbody><tr><td>Maximum number of parallel Apex callouts in a single continuation<\/td><td>3<\/td><\/tr><tr><td>Maximum number of chained Apex callouts<\/td><td>3<\/td><\/tr><tr><td>Maximum timeout for a single continuation<sup>1<\/sup><\/td><td><a><\/a>120 seconds<\/td><\/tr><tr><td>Maximum Visualforce controller-state size<sup>2<\/sup><\/td><td>80 KB<\/td><\/tr><tr><td>Maximum HTTP response size<\/td><td>1 MB<\/td><\/tr><tr><td>Maximum HTTP POST form size\u2014the size of all keys and values in the form<sup>3<\/sup><\/td><td>1 MB<\/td><\/tr><tr><td>Maximum number of keys in the HTTP POST form<sup>3<\/sup><\/td><td>500<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><sup>1<\/sup>&nbsp;The timeout that is specified in the autogenerated Web service stub and in the HttpRequest objects is ignored. Only this timeout limit is enforced for a continuation.<\/p>\n\n\n\n<p><sup>2<\/sup>&nbsp;When the continuation is executed, the Visualforce controller is serialized. When the continuation is completed, the controller is deserialized and the callback is invoked. Use the Apex&nbsp;<samp>transient<\/samp>&nbsp;modifier to designate a variable that is not to be serialized. The framework uses only serialized members when it resumes. The controller-state size limit is separate from the view state limit. See&nbsp;<a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/apex_continuation_limits.htm#view_state_diff_title\">Differences Between Continuation Controller State and Visualforce View State<\/a>.<\/p>\n\n\n\n<p><sup>3<\/sup>\u00a0This limit is for HTTP POST forms with the following content type headers:\u00a0content-type=&#8217;application\/x-www-form-urlencoded&#8217;\u00a0and\u00a0content-type=&#8217;multipart\/form-data&#8217;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Follow below guide form salesforce <\/p>\n\n\n\n<p><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/apex_limits_tips.htm\">https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/apex_limits_tips.htm<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Due to the nature of multitenancy and the fact we are sharing resources, governor limits are in place to ensure that all resources are allocated as expected to each. There are different types of governor limits Per-Transaction Apex Limits: These limits count for each Apex transaction. For Batch Apex, these limits are reset for each [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[18,20,5],"class_list":["post-173","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-apex","tag-apex-batch","tag-salesforce"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Salesforce Governor Limits - Apex, Platform, Event and callout - DoozySpot<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/doozyspot.com\/?p=173\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Salesforce Governor Limits - Apex, Platform, Event and callout - DoozySpot\" \/>\n<meta property=\"og:description\" content=\"Due to the nature of multitenancy and the fact we are sharing resources, governor limits are in place to ensure that all resources are allocated as expected to each. There are different types of governor limits Per-Transaction Apex Limits: These limits count for each Apex transaction. For Batch Apex, these limits are reset for each [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/doozyspot.com\/?p=173\" \/>\n<meta property=\"og:site_name\" content=\"DoozySpot\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-14T19:24:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-14T19:24:31+00:00\" \/>\n<meta name=\"author\" content=\"doozyspot\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"doozyspot\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/doozyspot.com\/?p=173#article\",\"isPartOf\":{\"@id\":\"https:\/\/doozyspot.com\/?p=173\"},\"author\":{\"name\":\"doozyspot\",\"@id\":\"https:\/\/doozyspot.com\/#\/schema\/person\/bccb52398479b1354683df33f84154d6\"},\"headline\":\"Salesforce Governor Limits &#8211; Apex, Platform, Event and callout\",\"datePublished\":\"2022-11-14T19:24:25+00:00\",\"dateModified\":\"2022-11-14T19:24:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/doozyspot.com\/?p=173\"},\"wordCount\":2487,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/doozyspot.com\/#organization\"},\"keywords\":[\"Apex\",\"Apex Batch\",\"Salesforce\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/doozyspot.com\/?p=173#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/doozyspot.com\/?p=173\",\"url\":\"https:\/\/doozyspot.com\/?p=173\",\"name\":\"Salesforce Governor Limits - Apex, Platform, Event and callout - DoozySpot\",\"isPartOf\":{\"@id\":\"https:\/\/doozyspot.com\/#website\"},\"datePublished\":\"2022-11-14T19:24:25+00:00\",\"dateModified\":\"2022-11-14T19:24:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/doozyspot.com\/?p=173#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/doozyspot.com\/?p=173\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/doozyspot.com\/?p=173#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/doozyspot.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Salesforce Governor Limits &#8211; Apex, Platform, Event and callout\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/doozyspot.com\/#website\",\"url\":\"https:\/\/doozyspot.com\/\",\"name\":\"DoozySpot\",\"description\":\"One of its kind in knowledge base\",\"publisher\":{\"@id\":\"https:\/\/doozyspot.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/doozyspot.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/doozyspot.com\/#organization\",\"name\":\"DoozySpot\",\"url\":\"https:\/\/doozyspot.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/doozyspot.com\/#\/schema\/logo\/image\/\",\"url\":\"http:\/\/doozyspot.com\/wp-content\/uploads\/2023\/03\/download.jpg\",\"contentUrl\":\"http:\/\/doozyspot.com\/wp-content\/uploads\/2023\/03\/download.jpg\",\"width\":1200,\"height\":1200,\"caption\":\"DoozySpot\"},\"image\":{\"@id\":\"https:\/\/doozyspot.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/doozyspot.com\/#\/schema\/person\/bccb52398479b1354683df33f84154d6\",\"name\":\"doozyspot\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/doozyspot.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2584f56a7b7945fd49a8fdf22dd31fa7baf3cf6f10370736f2d2895c7d9219f4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2584f56a7b7945fd49a8fdf22dd31fa7baf3cf6f10370736f2d2895c7d9219f4?s=96&d=mm&r=g\",\"caption\":\"doozyspot\"},\"sameAs\":[\"http:\/\/doozyspot.com\"],\"url\":\"https:\/\/doozyspot.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Salesforce Governor Limits - Apex, Platform, Event and callout - DoozySpot","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/doozyspot.com\/?p=173","og_locale":"en_US","og_type":"article","og_title":"Salesforce Governor Limits - Apex, Platform, Event and callout - DoozySpot","og_description":"Due to the nature of multitenancy and the fact we are sharing resources, governor limits are in place to ensure that all resources are allocated as expected to each. There are different types of governor limits Per-Transaction Apex Limits: These limits count for each Apex transaction. For Batch Apex, these limits are reset for each [&hellip;]","og_url":"https:\/\/doozyspot.com\/?p=173","og_site_name":"DoozySpot","article_published_time":"2022-11-14T19:24:25+00:00","article_modified_time":"2022-11-14T19:24:31+00:00","author":"doozyspot","twitter_card":"summary_large_image","twitter_misc":{"Written by":"doozyspot","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/doozyspot.com\/?p=173#article","isPartOf":{"@id":"https:\/\/doozyspot.com\/?p=173"},"author":{"name":"doozyspot","@id":"https:\/\/doozyspot.com\/#\/schema\/person\/bccb52398479b1354683df33f84154d6"},"headline":"Salesforce Governor Limits &#8211; Apex, Platform, Event and callout","datePublished":"2022-11-14T19:24:25+00:00","dateModified":"2022-11-14T19:24:31+00:00","mainEntityOfPage":{"@id":"https:\/\/doozyspot.com\/?p=173"},"wordCount":2487,"commentCount":0,"publisher":{"@id":"https:\/\/doozyspot.com\/#organization"},"keywords":["Apex","Apex Batch","Salesforce"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/doozyspot.com\/?p=173#respond"]}]},{"@type":"WebPage","@id":"https:\/\/doozyspot.com\/?p=173","url":"https:\/\/doozyspot.com\/?p=173","name":"Salesforce Governor Limits - Apex, Platform, Event and callout - DoozySpot","isPartOf":{"@id":"https:\/\/doozyspot.com\/#website"},"datePublished":"2022-11-14T19:24:25+00:00","dateModified":"2022-11-14T19:24:31+00:00","breadcrumb":{"@id":"https:\/\/doozyspot.com\/?p=173#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/doozyspot.com\/?p=173"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/doozyspot.com\/?p=173#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/doozyspot.com\/"},{"@type":"ListItem","position":2,"name":"Salesforce Governor Limits &#8211; Apex, Platform, Event and callout"}]},{"@type":"WebSite","@id":"https:\/\/doozyspot.com\/#website","url":"https:\/\/doozyspot.com\/","name":"DoozySpot","description":"One of its kind in knowledge base","publisher":{"@id":"https:\/\/doozyspot.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/doozyspot.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/doozyspot.com\/#organization","name":"DoozySpot","url":"https:\/\/doozyspot.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/doozyspot.com\/#\/schema\/logo\/image\/","url":"http:\/\/doozyspot.com\/wp-content\/uploads\/2023\/03\/download.jpg","contentUrl":"http:\/\/doozyspot.com\/wp-content\/uploads\/2023\/03\/download.jpg","width":1200,"height":1200,"caption":"DoozySpot"},"image":{"@id":"https:\/\/doozyspot.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/doozyspot.com\/#\/schema\/person\/bccb52398479b1354683df33f84154d6","name":"doozyspot","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/doozyspot.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/2584f56a7b7945fd49a8fdf22dd31fa7baf3cf6f10370736f2d2895c7d9219f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2584f56a7b7945fd49a8fdf22dd31fa7baf3cf6f10370736f2d2895c7d9219f4?s=96&d=mm&r=g","caption":"doozyspot"},"sameAs":["http:\/\/doozyspot.com"],"url":"https:\/\/doozyspot.com\/?author=1"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/doozyspot.com\/index.php?rest_route=\/wp\/v2\/posts\/173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doozyspot.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doozyspot.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doozyspot.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doozyspot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=173"}],"version-history":[{"count":1,"href":"https:\/\/doozyspot.com\/index.php?rest_route=\/wp\/v2\/posts\/173\/revisions"}],"predecessor-version":[{"id":174,"href":"https:\/\/doozyspot.com\/index.php?rest_route=\/wp\/v2\/posts\/173\/revisions\/174"}],"wp:attachment":[{"href":"https:\/\/doozyspot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doozyspot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doozyspot.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}