The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
1
vote
0answers
31 views

SOQL 101 issue, Need help in trimming Trigger code

I have the following trigger which is possibly a culprit to cause this SOQL 101 issue. I am not an expert so not see what is wrong here, so I need an expert to advise and suggestions where I have ...
0
votes
0answers
34 views

How to design solution for querying 200k+ records and using that inside LWC?

I have a problem statement where I need to design an LWC component to enter policy information and check if that policy already exists in the system and print a report of those that aren't in the ...
1
vote
2answers
20 views

Single Email Limit Exceeded

I am hitting an apex error in production: "SINGLE_EMAIL_LIMIT_EXCEEDED". I have unit tests in production that run when I do the deployment that call methods as part of the test that send out email ...
0
votes
1answer
17 views

Avoid governance limit for bulk-assign a large number of records to unique contacts

Let's say I have a generic "container" record that is used to store JSON responses from third-party API's. These Container records have a single field 'data', which is a JSON string identifying ...
2
votes
2answers
71 views

CPU time limit jumps from 2000 to 14000 after a trigger ends

Hi I am having trouble with the Apex CPU time limit. I've optimized my code as much as I know how to, but when my trigger finishes running it goes from 2000 to 14000. Does anyone know what else is ...
0
votes
1answer
34 views

Need work around for salesforce limitation when making callout

I have searched but i didn't get how to fix this issues Actually I'm making callout to Google Vision Api from salesforce apex class. When i m uploading image with more text content, response from ...
0
votes
2answers
43 views

How to implement Apex Batchable properly, need to update ~5M records

I need to update CampaignMember, the value that I need to insert is in Opportunities, but there are more than 4 Million records, I was using Jitterbit and Excel to do this, but is very difficult ...
0
votes
0answers
17 views

Salesforce grouping execution flow

Is possible Salesforce be agroupping the Lighting flow execution? We are working with Platform events calling a specific Lightning flow each time it runs, and we noticed the flows are being executed ...
0
votes
1answer
46 views

Calculating getDmlStatements

I am wondering how I can calculate DMLStatements. The test below adds unexpectly 3 instead of 1 -> after insert. Why? System.debug( Limits.getDmlStatements( ) );//0 Account ac = new Account( Name = '...
0
votes
0answers
61 views

How to debug the error: 'Apex CPU time limit exceeded'

The trigger written in my salesforce org is hitting the apex cpu time limit . Hence I am trying to optimize apex code and reducing the workflow updates. But below log is confusing me about the apex ...
0
votes
1answer
41 views

Trying to update records by scheduling an apex class. However, I'm getting CPU Timeout Error with the code below. Am I suppose to use maps?

List<Deal__c> records = [ SELECT Name FROM Deal__c WHERE CloseDate__c < TODAY AND RecordType.Name = 'Franchise' AND (StageName__c != 'Servicing' OR StageName__c != 'Closed Lost') ]...
0
votes
1answer
31 views

Reaching Connect API's hourly request limit for this user and application?

I`ve got this type of error during the work in Lightning Community: You have reached the Connect API's hourly request limit for this user and application. Please try again later. My API Requests ...
0
votes
1answer
23 views

How to bypass read timed out error while making callouts?

I have been trying making a request to Amazon Web Server, to send a document. In the request header, I am required to set a header named, Content-Length, which is currently being set to the BodyLength ...
0
votes
2answers
32 views

Get the number of SOQL calls in manage package

My org has a manage package installed. Is there any way to detect how many SOQL calls it has done in apex? I have code that fires because of it. Once a certain number of SOQL calls have been attempted ...
0
votes
2answers
53 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
95 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
37 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
62 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 ...
2
votes
2answers
73 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
41 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
289 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
66 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 ...
9
votes
1answer
185 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
23 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
38 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
135 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
87 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
36 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
283 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
71 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
95 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
29 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
27 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
153 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
63 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
119 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
46 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
48 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
23 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
317 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
69 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
38 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
39 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
23 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
56 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
97 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
308 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
207 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
184 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 ...