Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [governorlimits]

Governor limits are limits enforced by the Apex runtime engine to ensure that runaway Apex does not monopolize shared resources in the multitenant environment. These limits are tracked and enforced during the execution of Apex code and if a governor limit is exceeded an uncatchable runtime exception is generated, such as "Too Many SOQL Queries".

0
votes
1answer
19 views

Email sent from Lead is counting under daily limit

I was going through the salesforce document Daily Allocations for Email Alerts It is mentioned that There’s no limit on sending single emails to contacts, leads, person accounts, and users in your org ...
0
votes
1answer
47 views

Too Many SOQL Queries error

I am coming into this problem in my debug logs. But when I'm reviewing the logs I am only seeing individual reads of SOQL query counts from various apps such as : Number of SOQL queries: 5 out of ...
0
votes
1answer
33 views

Is there a better way to create related records when creating test data?

I am trying to create a large set of test data along with child records and this is what i came up with. Could anyone let me know if there's a better way to achieve the same? Integer countStart = ...
4
votes
1answer
41 views

How to get a JSON formated snapshot of the current Apex limits with minimal code

I know how to do this technically. Create a class with fields for all Limits and JSON.serialize it. But I thought maybe there is a way to get all limits as map an skip the class writing step. I know ...
1
vote
1answer
16 views

How can I tell what the 'Maximum number of batch apex jobs queued or active concurrently' limit is in our org?

Is there a way I can tell what the 'Maximum number of batch apex jobs queued or active concurrently' limit is in our org? Usually it is 5 (Refer to Page 3 in this document), but I believe our org has ...
0
votes
1answer
17 views

LDV : What is max records that aggregate query can work with?

I am having difficulty understanding limits on aggregate queries. Salesforce Documentation for ReadOnly Attribute of Visualforce Page says Normally, queries for a single Visualforce page request ...
0
votes
0answers
17 views

Count the 5 queued or active batch jobs that is allowed for Apex

I am trying to update my code from sequence queueable to sequence batch. This is the link of the code I've tried to update Run Queueable as sequence, The problem I have at the moment is that this ...
0
votes
2answers
37 views

Bulk data loader operations:: System.LimitException: Too many SOQL queries: 101

I am getting an error while performing data loader operations on the Leads object as I get this error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY:LeadTrigger: System.LimitException: Too many SOQL ...
4
votes
2answers
62 views

Hitting the governor limit of SOQL in recursion, how can I avoid this in recursion of getTreeData method?

public class BOM_Container_TreeController { @AuraEnabled public static String getTreeData(String acId){ List<HS_Sales__Bill_Of_Materials__c> boms = [Select Id , Name from ...
1
vote
2answers
51 views

SOQL governor reached using multiple strike_lookup

I'm developing a custom lighting component, in which I have a table with 2 columns, each cell is composed by a strike_lookup Everything works as expected until I have too many rows, thus too many ...
7
votes
1answer
80 views

Slow scratch orgs causing Apex CPU time limit to be hit about 20% of the time - any workarounds?

We have an SFDX build set up that runs our 2,800 tests against 6 different scratch org configurations in parallel. But every build fails on what seems like a random one of the scratch orgs (i.e. it ...
0
votes
1answer
28 views

Salesforce Standard API - Composite Tree resource

In order to create record in bulk using REST API, we using Composite Tree resource. I'm trying to upload a bulk of content versions : {"records" :[ { "attributes" : {"type" : "ContentVersion", "...
0
votes
1answer
48 views

Outbound email message with attachments limit

I am using Apex to send emails with attachments to users (with SingleEmailMessage to be more precisely). From some MB (I Don't sure exactly the size - because it changed from time to time when I try ...
2
votes
1answer
50 views

Maximum number of records retrieved by one SOQL query in a lightning Apex backend controller

What is the maximum number of records retrieved by one SOQL query in a lightning Apex backend controller? According to this: Total number of records retrieved by SOQL queries | 50,000 But for me ...
1
vote
1answer
87 views

Salesforce Standard API - Content Version

I'm trying to send an array of content versions via the Standard API that Salesforce suggests : Using POST method to : https://SandboxName.my.salesforce.com/services/data/v43.0/sobjects/...
1
vote
2answers
69 views

Limits API callout in Apex

I want to receive daily limit from apex. There is my code public static HttpResponse getLimits() { HttpRequest req = new HttpRequest(); Http http = new Http(); req.setMethod('GET'); ...
9
votes
3answers
119 views

Platform Event Apex trigger limits exception - where does it go?

If one publishes a Platform Event, the consuming trigger executes as Automated Process user. If that consuming trigger exceeds CPU limits, no notification is sent to the developer(s). Even though ...
1
vote
1answer
31 views

Are trigger limits applied for every flow

I'm checking an integration to a SF org and it seems to be hitting "Apex CPU time limit exceeded" and it is brining up different sources. Sometimes it breaks during a process builder action from a ...
1
vote
2answers
67 views

Query Limit on Batchable Class

What is the best practice with governor limits with Batchable classes and queries inside of the Batchable class? I am running into query limits with a Batchable class because I have too many ...
3
votes
0answers
71 views

Synchronous concurrent transactions limit

I know that the following limits exist in salesforce: Number of synchronous concurrent transactions for long-running transactions that last longer than 5 seconds for each org : Limit 10 Concurrent ...
1
vote
2answers
143 views

How to resolve Webcallout error System.LimitException: Too many callouts: 101 when displaying data on Lightning component

I'm making a webservice callout to an external webservice and displaying data on a Lightning component. Data is returned in JSON format in multiple pages. Each page has 50 records. In my apex ...
1
vote
2answers
56 views

Heap size LIMIT

I'm trying to reduce the heap size limit while a program is running - I'm doing it by taking the data (a list for example) and after I'm using it, I'm assigning the instance to a new List : Example: ...
0
votes
1answer
47 views

Too Many SOQL queries: 101 Exception

trigger SoM_RequestCancelledOnFeePayment on SoM_Request__c (after update) { if (!SoM_Utilities.gs.Disable_Triggers__c) { List<MUSW__Fee_Payment__c> feePymtsToUpdate = new List<...
1
vote
1answer
82 views

Salesforce limit of synchronous rest service

I have to implement in salesforce many inbound synchronous rest services. What are the salesforce limits that I have to consider? I found only the following: API Requests. A long-running API request ...
2
votes
2answers
73 views

Map / Trigger / Governor limits

While studying for my Platform Developer 1 exam, I came across this line. Could someone please explain how this is the case? Question: How can a developer avoid exceeding governor limits when using ...
0
votes
1answer
34 views

Optimal number of records per batch

I have a problem executing a batch in some limit cases that i want to cover to avoid future concerns. The scenario is the following: My batch works on n(reasonable high number) records of the same ...
1
vote
1answer
232 views

Governor Limits on Salesforce Government Cloud

Considering Salesforce Government Cloud is a partitioned instance running on dedicated resources (and also because it's for government needs), are governor limits more relaxed for these instances? ...
1
vote
2answers
371 views

Limitation on external system calling Salesforce

Is there any limit on how many times an external system can call Salesforce to get data? For example, ETL Tools, Mulesoft etc.
6
votes
1answer
76 views

Create Case thread Id using Apex (SOQL limit-proof)

There are many posts about creating Case threadIds with Apex, notably Case.Thread_Id, is Thread_Id a field on Case object? As the posters have noted, the SFDC rules of the threadId are subject to ...
1
vote
1answer
53 views

Can we avoid 'Attempted to schedule too many concurrent batch jobs in this org' error using Apex flex queue?

We have a batch class AccountDeactivationBatch from whose finish() method we run 3 more batches, including AccountDeactivationBatch again, but with new set of Ids. These new set of Ids are all ...
0
votes
2answers
155 views

Trigger error - Too many DML rows: 10001

I have tried to optimize the code, but still it throws the error: Too many DML rows: 10001 Below is my code: if(setAccID != null && !setAccID.isEmpty()) { list<Custom__c&...
0
votes
3answers
88 views

Avoid 'Apex CPU time limit exceeded' with Batch Process

I encountered this error and have trouble with performance tuning. I tried asyncronous approach, but Apex CPU time limit exceeded occurs continuously. Anybody can make it more efficient? Here is ...
1
vote
2answers
345 views

Batch APEX requiring two queries and hitting limits

I have a batch APEX class that is used to delete any contacts that have been created over a year ago and have no related opportunities. I have queries for the contacts in the QueryLocator. I am then ...
4
votes
1answer
64 views

SOQL Count() limits

Summer '18 changed Count() impact on query row limit from "number of records matched" to 1. Is there still some form of a limit, like selectivity criteria related limits, or can an arbitrary number ...
4
votes
1answer
79 views

Transactional governor limits and managed packages

My company is looking to install a very large managed package into our org, which has a significant amount of custom apex as well as several other large managed packages. As we test the package in ...
0
votes
1answer
33 views

Anonymous window Too many SOQL queries: 101

I've tried to execute the following script: List<Task> taskList = [SELECT status, CalculatedWorkingHours__c FROM Task WHERE CalculatedWorkingHours__c = -1.0 AND status = 'Completed']; ...
1
vote
1answer
86 views

MC AMPScript RetrieveSalesforceObjects() hitting governor limits

Imagine a scenario where we have a Marketing Cloud connected to a Sales Cloud. Around 1500 campaign members will enter a journey at approximately same time and then each of those members will receive ...
0
votes
1answer
204 views

REQUEST_RUNNING_TOO_LONG

First error: [REQUEST_RUNNING_TOO_LONG] Your request was running for too long, and has been stopped. I was looking at What causes REQUEST_RUNNING_TOO_LONG test errors?. I was guessing because its a ...
-1
votes
5answers
102 views

SOQL inside nested for loop

I'm displaying the accounts name those have cases attached in it. Accounts with no cases won't be displayed here. Unfortunately I'm facing 50001 error since I'm doing SOQL inside a for loop. But I'm ...
0
votes
0answers
35 views

Did not receive exception email in production

We usually get exception emails to our admin from the production. I have a asynchronous code running in production @future public static void processRecords(String FIMCJSONRec) { ...
0
votes
1answer
96 views

Batch Apex Chaining Limits

I have seen Apex Batch Job Chaining Limits, but my questions is little bit different so still wanted to confirm. I was looking to chain 3 batch classes. Below would be number of batch classes. ...
6
votes
1answer
179 views

Lightning component limitaion

Just wondering -- How many records can be shown on a lightning component without doing the pagination. Do Components have the limitaions just like that of VF pages?
0
votes
2answers
70 views

Governor Limit Exception and Finally blocks

We all know that if you hit a Governor Limit Exception, your code/application will terminate with an unhandleable exception know as a Governor Limit Exception. My question is does your code ...
0
votes
2answers
206 views

Clear platform event limits?

Where can I find clear docs on the API limits for sending platform events IN to sfdc? The platform events basics trailhead notes that: provides allocations for how many events you can define in ...
0
votes
1answer
23 views

Estimate the number of queries per month

Is there any way to estimate the number of Queries per month in a salesforce instance?
2
votes
3answers
37 views

Query sObject with different type

I need to do a query in the database, the idea is to retrieve at the same time all the object id's and do it in a way you don't touch the limits. Something like: [Select Id from sObject Where Id >...
0
votes
1answer
26 views

passing an instance of the class Limits

There is a class Limits that allows to keep track of the governor limits. I need to capture 6 of the governor details of this class, that is why I need to pass an instance of the class Limits to a ...
0
votes
1answer
51 views

parent-child relationship subqueries not contributing to governor limits

As per the article Execution Governors and Limits In a SOQL query with parent-child relationship subqueries, each parent-child relationship counts as an extra query. The row counts from these ...
3
votes
2answers
77 views

How many DML statements will be execute for below code?

Below is the logic/Method i have built to eliminate error while inserting case Object. Consider a example when i try insert case object inside try block, if it is throwing an error while inserting, I ...
0
votes
1answer
43 views

Maximum number of children allowed in a parent-to-child lookup relationship

Is there any limit on the number of children a parent can have in a lookup relationship? If there is no limit, Is there any good practice guideline with regards to the number of children added to a ...