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".

Filter by
Sorted by
Tagged with
0
votes
2answers
24 views

How do I see limits associated to REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded

After using sfdx force:source:deploy a good amount today to deploy to production (see how to here), I hit the following error: ERROR running force:source:deploy: REQUEST_LIMIT_EXCEEDED: ...
0
votes
1answer
25 views

System Permissions Assigned to Permission Set

Is there a SOQL/SOSL to export/FETCH only the System Permissions from a Specific Permission Set in Salesforce.
1
vote
2answers
27 views

Limit on Batch class

If I run a batch class every night, that goes over 10000 leads every night and updates a field. Would I get the limit exceeded error considering the huge number of records?
2
votes
1answer
29 views

How do SOQL queries act in Queueable (async) apex?

I have a set of 4 Queueable apex classes that perform an ordered series of tasks on a large number of records. It queries a limited number of records, modifies them so that they no longer meet the ...
1
vote
2answers
40 views

Journey Builder Salesforce Data Event and APEX Governor Limits

We use Salesforce Data Event as journey entry source and we now have a requirement to do a bulk upload of contacts to Sales Cloud and inject all of them into a running welcome journey. Could someone ...
0
votes
1answer
36 views

Why isn't my Queueable chain working?

I have the following class, none of the dependencies invoke Queueable: public class TEST_SandboxDataFactory { public static void create() { List<SObjectType> sObjectTypeList ...
1
vote
2answers
237 views

The 50,000 row query limit is not actually a “per APEX call” as widely believed

I recently ran into a strange issue with the 50,000 row query limit that had me puzzled due to the belief that the 50,000 row query limit applied only per-call. This realization occurred while ...
2
votes
4answers
55 views

See Number of Queries Executed in Call-chain

I have an Apex Controller that is sporadically bumping up against the SOQL Governor limit when executing some functionality. The functionality does some queries and updates some values which executes ...
7
votes
1answer
143 views

How to determine Platform Event Size in Apex to ensure to be within < 1 MB

The documentation on Platform event states: The maximum event message size that you can publish is 1 MB. Is there a native and reliable way in Apex to check whether the Platform Event I am about ...
1
vote
1answer
15 views

Many platform events per transaction and affect on Heap

Given 100 platform events published for Foo__e in the same second Each platform event represents 100K of data (10MB data altogether across the 100 events) When SFDC presents the events to the ...
3
votes
1answer
35 views

Optimizing Process Builder: Early Exit: Worthwhile?

Given An asynchronous transaction receives Json payload that is transformed by Apex into Assets. Process Builder on Asset with a dozen decision blocks, none of which are ever true for the inserted ...
15
votes
1answer
132 views

Does data referenced from the Platform Cache consume heap space?

Reading Platform Cache Limits, it appears that an individual request can obtain up to 1 MB of data from the Platform Cache: Maximum local cache size for a partition, per-request 1,000 KB ... ...
2
votes
2answers
81 views

Find record diff between two dates in Apex (to minimize API calls)

I have a managed package app with a CustomObject__c where some of its fields need to be "synced" with an external web service. To stay within technical limits the Sync callout is only done once a day. ...
3
votes
1answer
34 views

Access governor limits values for managed package via Apex

So the system class Limits is available to get the number of any limits against an org. For performance tuning and logging perspective, is it possible to get the Limits for an installed managed ...
2
votes
2answers
252 views

Apex Sleep: what is CPU penalty

As we know (as of V46), there is no apex sleep method. Various workarounds have been proposed such as doing a callout to a service with platform support for sleep but this makes unit testing ...
0
votes
2answers
63 views

How to bypass Governors limit when inserting more than 10000 records from the execute method of a Apex Batch

Edits : Adding the code snippet here for review global class Agg_Batch implements Database.Batchable<sObject>, Database.Stateful, System.Schedulable { global Agg_Batch() { //...
0
votes
1answer
20 views

Load Testing For email Sending within a Batch

I wondering if there are any tools that I can use for Load Testing. I have a 2 batch : Batch A Bacth B Which both of them using the Database.Stateful and I'm calling Batch B from Batch A's finish ...
0
votes
1answer
57 views

CANNOT_EXECUTE_FLOW_TRIGGER - System.LimitException: Too many query rows: 50001

I have an apex class that was written by a previous SF Admin and I'm trying to understand why it isn't working. From what I can tell, it is supposed to auto-populate the Account Name that is ...
0
votes
1answer
27 views

Managed package governor limits

We have a managed package that we don't want to publish to App Exchange. Is there any way that we can get our separate governor limits, so our operations wouldn't count against the installing ...
0
votes
1answer
23 views

How many API calls can be made per hour to a non-bulk endpoint?

Assume that there was a REST endpoint that worked with 1 record at a time, i.e. not bulkified. If we were to use the Apex scheduler to pull down the records into SFDC every hour, what would be the ...
7
votes
2answers
151 views

Are some Apex governor limits are becoming “softer”?

Im currently updating lots of records of an SObject having extensive trigger logic and today I've noticed this limit consumption: Limit Name .................... ┃ ...Actual ┃ ....Maximal ┃ ....Usage ...
1
vote
1answer
47 views

Rollback of a transaction in case of Gov Limit Error while using AllOrNone false

Will the entire transaction be rolled back in case of Governor Limit exception if I have fired some partial saves done? e.g. if the gov limit exception of 100 SOQL is hit while execution of contact ...
1
vote
1answer
76 views

Aura Component + HttpCallout + Large File Response

Trying to figure out how best to build interfaces that retrieve external files between 1-10 MB and display them in the UI. Right now I have a Lightning Aura Component that calls a web service via ...
1
vote
1answer
42 views

Do really row counts from parent-child relationship sub-queries contribute to the row counts of the overall code execution?

Most of us know this is a very basic question but I little confused here again, As per the documentation here, it says that parent-child query row count is added to the overall row count in the ...
0
votes
1answer
44 views

Can someone provide me the list of SOQL exceptions?

Can someone provide me the list of SOQL exceptions? a URL link which has all the exceptions and explanations. Thanks in advance
0
votes
0answers
21 views

Processing CampaignMember object without hitting governor limits

Campaign is used to create parent campaign which is assigned to each term. Each parent gets set of child campaigns with parentId=null (that's how we distinguish between parent and child campaigns) ...
2
votes
2answers
266 views

How can I monitor the bulk API limit?

Salesforce limits you to 10,000 batches per 24-hour period. For reference: https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/...
1
vote
2answers
65 views

How can I create 1500 contacts for my units tests without hitting CPU limit?

I am creating a script that gets run every quarter that checks for any paid status in campaignMember objects that has contactId attached, and update the status to unpaid and create a campaignMember ...
2
votes
1answer
35 views

Is there any ways to identify which managed packages most significantly consume our limits?

Our org is having trouble with our SOQL and CPU Time Limits. While it is probably true that our own legacy code could be bulkified better, this is a non-trivial, non-short term solution. Our org has ...
1
vote
1answer
35 views

Process Builder - How Big is too Big? Can PB handle this?

We're doing a case routing overhaul and considering process builder. If we choose process builder it be around: -100-150 Criteria's -10-30 actions per criteria -(Possibly a 2nd criteria with 10-30 ...
0
votes
0answers
22 views

Process builder and mass update

My question is about behaver of Process builder when we do mass update with ListView or Data loader. Is it triggered sepeparately for each record? If not and it is mass triggered how can we secure it ...
0
votes
1answer
53 views

List.clear() not emptying my List

The project that I am working on has an API endpoint that is meant to upload a large number of records into three different tables: Careers, Degrees, and CareerDegreeRelationships. The endpoint is ...
1
vote
0answers
77 views

How to design Flows to stay under new per-month governor limit? [closed]

As I am aware, the "Maximum Flow Interviews Without UI per Month" governor limit is relatively new in a recent release of Salesforce. One of my Salesforce orgs has a few hundred Salesforce users and ...
1
vote
2answers
200 views

How to be able to process a large JSON response?

We're calling an external REST service from Salesforce and are receiving a JSON response of more than 45 MB. Has anyone attempted anything like this?
1
vote
1answer
115 views

Searching for records in list view when more than 2000 rows

I have a custom object that has more than 2000 records. I have a custom field, id__c, that is a number that is searchable. The records I have in there have id__c's ranging from 1 to 3000. I am ...
1
vote
2answers
131 views

What are the limitations of number of Rows that can be returned in an Aura Enabled APEX Method?

I keep reading conflicting answers about how many rows an SOQL query can return in an APEX method. Some say 200, some say 2000, some say 50,000, and some say 1 million (read only). I am looking for ...
3
votes
2answers
557 views

Concurrent requests limit exceeded - how to find the problematic code

I am a developer for a Salesforce org that serves as a community portal for thousands of users. We have been consulting with a large team of developers for years and everything we have is custom coded....
1
vote
1answer
61 views

Platform Event batching

I have a simple Platform Event called Timesheet_Approval__e. As a test, I publish a batch of 1000 events with this anonymous apex: List<Timesheet_Approval__e> approvals = new List<...
2
votes
3answers
120 views

Overcome Queueable maximum depth limit in dev orgs

To migrate "trees of related data" from an external system to Salesforce I am using dynamic chains of Apex Queueables. Imagine I am "synchronizing" Accounts, Opportunities and Contacts from an ...
2
votes
2answers
385 views

Is there a limit on the maximum number of future jobs queued in an org?

I know there are certain limits with batch jobs, queued jobs, etc., but what about future jobs?
0
votes
1answer
47 views

Find how many System.Debug lines are there in sandbox environment?

I want to find how many System.Debug lines are there in sandbox environment. As System.Debug statment is Consider in Apex character limit count. So Is there any tool or any method such as Tooling ...
3
votes
1answer
58 views

Which scheduled jobs count towards the max concurrent scheduled jobs limit?

Per the docs we can only have 100 scheduled apex jobs at any one time in most orgs (5 in dev orgs). Which jobs count towards those limits? Would the following query return the right number? SELECT ...
0
votes
1answer
46 views

Efficient SOQL for record classification

I need to "classify" an incoming Record A based on several related fields on records B,C,D,.. etc. Therefore I need a trigger that is triggering (:D) on this new record and check more then 5 lookup ...
0
votes
1answer
132 views

Are there governance limits on lightning web components

Was curious. Client wants us to render data from an external database in a lightning web component data table. In this situation, as a front ender, I would typically just make an API call out from the ...
25
votes
1answer
335 views

Why am I double charged on DML limits in a process builder?

This question is a follow-up from another question where the accepted answer states that for each Update Records action in a process, following limits are consumed: As you can therefore conclude, ...
0
votes
1answer
22 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
124 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
36 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
56 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
39 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 ...