Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [concurrency]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
2 answers
1k views

When the triggers run in context of a composite standard Rest api, which governor limit it comes under?

We have many composite apis for external party to enter data or modify data in our org in real time when the external system receives data. We also have an integration with CTI <-> SF, where ...
Nagendra Singh's user avatar
0 votes
1 answer
376 views

Can I chain Bulk API jobs?

I have to load millions of records in a data migration process and I'm dealing with a parent object and a couple of custom child objects. After initial load, data will keep flowing, as Salesforce has ...
Stefano Luoni's user avatar
4 votes
2 answers
12k views

ConcurrentPerOrgLongTxn Limit exceeded. Does SOQL query and Apex Callout timings gets counted

Apex CPU Time limit: Here Query timings and Callout timings does not get counted. But would SOQL timings and Callout timings contribute to ConcurrentPerOrgLongTxn ? We started hitting ...
Nagendra Singh's user avatar
0 votes
1 answer
534 views

Multiple users and concurrent transactions

I have a client who wants us to build a custom auto-number function that applies only to a certain type of campaign record. They want to append the number to a text field for that specific campaign ...
David Cheng's user avatar
  • 7,084
0 votes
1 answer
295 views

Query cursor Question

Have a query regarding Query Cursor. There are two limits that I see for Maximum number of query cursors open concurrently per user in the limits cheatsheet doc. i) 50 for Apex Transactions. ii) 10 ...
MBM's user avatar
  • 129
2 votes
1 answer
866 views

How does Salesforce ensure new record IDs for the same object are unique during simultaneous inserts?

Just curious. I know record Ids are not guaranteed to be sequential from the docs. I've also already read this post on what are IDs are composed of. But lets say 2 or more transactions started at the ...
Ken K's user avatar
  • 33
1 vote
1 answer
325 views

Concurrent session record locking timeout issue

Intro: On every member registration, there is logic that creates unique number for that registration. We have solution that is using “Configuration” record, that holds formatting and counter to ensure ...
jakub's user avatar
  • 173
2 votes
1 answer
252 views

Is there a limit to how many concurrent or total retrievals you can make with Platform Cache?

The features documentation mentions that the Platform Cache API is what allows you to store and retrieve data that's tied to a Salesforce session or shared across your org. Seeing "API" ...
Kris Goncalves's user avatar
1 vote
0 answers
423 views

Hitting concurrent Request Limit!

Because of COVID-19, a new urgent web-form has been created in Salesforce Service to receive the customers' requests. This new web-form was published yesterday through Sites and many requests are ...
Chetan's user avatar
  • 313
-1 votes
1 answer
163 views

Synchronization object in Apex Class during concurrent calls

For working with Call Logs (Task object) to create and for updating I use OpenCTI and hierarchy custom settings as a cache to keep created TaskId. I have two methods in Apex Controller: when I get ...
SlavaHq's user avatar
1 vote
1 answer
791 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 ...
Lightning Evangelist's user avatar
4 votes
0 answers
393 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 ...
Francesco1981's user avatar
2 votes
2 answers
1k views

future method concurrency

I have a button that calls a very complex feature that caused salesforce limits to be reached. I modified the method in asynchronous (@future) and added two states: "waiting" and "not processed". ...
Pericle Parquet's user avatar
1 vote
2 answers
593 views

Property currently unsupported: 'concurrencyMode'

I was playing with workbench and tried to create job in "Rest Explorer". The Url I was using: /services/data/v41.0/jobs/ingest/ The Request Headers: Content-Type: application/json; charset=UTF-8 ...
Vera's user avatar
  • 73
1 vote
2 answers
2k views

How to set the concurrencyMode using the new Bulk API 2.0

I've read the documentation regarding the new Bulk API 2.0 but I haven't found the way to send a request with the parameter concurrencyMode and set it to Serial instead of Parellel. Can you help me ? ...
Lengoriel's user avatar
2 votes
0 answers
64 views

Unable to activate Process Builder on EmailMessage Obj - unable to obtain exclusive access

I am unable to activate a process builder and get the below error always. This is not a record that I am trying to update , it is a process builder. I checked whether there is any flow pending in ...
Arnold's user avatar
  • 439
8 votes
1 answer
952 views

Optimistic locking when working via REST API

I have a case when SF data can be updated concurrently by humans with UI and by a Ruby app via REST API, so I'm worried about the possibility they overwrite changes of each other. Is there a standard ...
RocketR's user avatar
  • 195
1 vote
1 answer
2k views

UNABLE_TO_LOCK_ROW issue in concurrent API call

I am trying to make 100 concurrent API calls for creating an Object Example1. And this Example1 object is having Master-Detail Relationship with Parent Example1 Object. I am using same ...
Seena V P's user avatar
  • 111
2 votes
1 answer
2k views

It is possible to set the concurrency mode for a Data Import Wizard job?

I'm running in to some problems that I believe may be related to parallel processing of an 'Add new record' job by the Data Import Wizard. Is it possible to somehow force the concurrency mode for the ...
Jelle van Geuns's user avatar
2 votes
1 answer
269 views

Salesforce transaction mutexes

This is more of a theory question. We have a use case where an object field is the sum of the records existing in the system + 1. This method is going to be accessed via force remoting. My worry is ...
TemporaryFix's user avatar
  • 2,946
7 votes
1 answer
458 views

Is an AsyncApexJob record inserted immediately at the end of a transaction?

Is an AsyncApexJob record inserted immediately at the end of a transaction or is it possible that there is a delay between those two events? I couldn't find firm guarantee in the documentation on that....
ipavlic's user avatar
  • 3,736
5 votes
1 answer
732 views

When using FOR UPDATE does Salesforce also lock the child records in a master-detail relationship?

For example, say I get a List of rows to delete using FOR UPDATE. These are all parent records in a master-detail relationship. Will the children be locked?
Bradley Thomas's user avatar
4 votes
2 answers
1k views

Concurrency issue on Batches

I have two batch classes that run concurrently. Let's call them Job A and Job B. Job A inserts records in object A. And Job B in object B. Object B has a lookup to Object A. Because this lookup is ...
Sebastian Kessel's user avatar
10 votes
3 answers
107 views

Best practices for protecting your app/package from integrations with harmful side effects

We distribute our app in the form of a managed package. We have found that, in some cases, customers create their own integration (triggers, flows...) that have harmful effects on our application (...
mkorman's user avatar
  • 4,046
0 votes
1 answer
319 views

Email handler bulk/concurrency issue

I have an email handler class which takes failure notification emails from a payment gateway and updates the relevant records in Salesforce accordingly. The payment gateway sends these emails in an ...
Philip Clark's user avatar
1 vote
0 answers
228 views

Get list of Concurrent processes in Execution

We are getting "Concurrent Requests Limit Exceeded." in our production org . Some transactions in our ORG require to much time as they involve callouts to external systems. Thus taking more than 5 ...
Pranay Jaiswal's user avatar
6 votes
2 answers
1k views

How to Reproduce the Concurrent Requests Limit?

I'm trying to write code that will reproduce the Concurrent Requests limit (10 requests longer than 5 seconds, described here: https://developer.salesforce.com/blogs/engineering/2013/05/force-com-...
SeanW's user avatar
  • 672
9 votes
1 answer
2k views

How to avoid "Edit Session" conflicts in apex?

I am working on a project where sometimes the users gets error "The record were editing was modified by Other User during edit session" during SAVE. I did my research and found out that Salesforce ...
Jag's user avatar
  • 1,205
11 votes
1 answer
2k views

Transaction isolation in Salesforce

As far as I understand Salesforce supports optimistic (by default) and pessimistic (using FOR UPDATE) locking for records. But what about transactions? If there direct analogy for typical SQL ...
Mike Raven's user avatar
  • 2,133
11 votes
2 answers
1k views

Enforcing mutual exclusion in Apex

I have an Apex class that calls out to a web service. The webservice doesn't allow multiple requests at the same time. I have an update trigger on Account that does the callout. So, if multiple users ...
user254875486's user avatar
8 votes
3 answers
2k views

At what point in the transaction lifecycle is SystemModstamp set?

I'm writing an integration that requires polling Salesforce to pull down changed data. I'm worried about concurrent updates to the records that would cause me to 'miss' updates. Concrete example: ...
daveespo's user avatar
  • 2,663
38 votes
1 answer
666 views

Help me solve a concurrency mystery (platform bug? Expected behavior? Or am I missing something?)

To set up the problem, add a new currency data type custom field called Test_Counter__c to the Opportunity Object. Then create a test opportunity named TestOp. Then create the following class: ...
kibitzer's user avatar
  • 3,434
6 votes
2 answers
257 views

Building VF Apps for Scale - Avoiding Locking Rows

Cut to the chase: What causes UNABLE_TO_LOCK_ROW errors and what are best practices for avoiding them? We built a great app that works solidly in development and testing. Today we launched to a ...
Benj's user avatar
  • 11.2k
10 votes
3 answers
9k views

How to atomically increment a custom field?

We are creating custom IDs for Accounts by incrementing an integer field in a custom class. The issue is that if two or more new Accounts are created in close sequence/simultaneously the following ...
Paul Sasik's user avatar
  • 1,119
19 votes
3 answers
12k views

SOQL Record Locking (FOR UPDATE)

I am looking for some more definitive and in depth information about record locking in Salesforce. I will admit I am quite a novice when it comes to the topic of record locking, and am not sure it is ...
Daniel Blackhall's user avatar