What is Salesforce concurrent limits?

What is Salesforce Concurrent Limits?

Salesforce, a leading customer relationship management (CRM) platform, has several limits in place to ensure that its system remains stable and efficient. One of these limits is the concurrent limit, which refers to the maximum number of simultaneous requests that can be processed by the platform at any given time.

What are the types of concurrent limits in Salesforce?

Salesforce has several types of concurrent limits, including:

  • Long Running API Requests: This limit applies to requests that take longer than 5 seconds to complete. The default limit is 10 requests per org.
  • Concurrent Apex Requests: This limit applies to synchronous transactions that are executed by Apex code. The default limit is 10 requests per org.
  • CPU Time Limits: This limit applies to the amount of time that a single request can take to complete. The default limit is 10 seconds for synchronous transactions and 60 seconds for asynchronous transactions.
  • Callout Limits: This limit applies to the number of external web services calls that can be made by Apex code. The default limit is 100 calls per transaction.

What happens when you exceed the concurrent limits?

If you exceed the concurrent limits, you may encounter errors, such as:

  • Concurrent API Errors: This error occurs when the number of long running API requests exceeds the limit.
  • Apex CPU Time Limit Exceeded: This error occurs when a single request takes longer than the allowed CPU time limit.
  • Callout Limit Exceeded: This error occurs when the number of external web services calls exceeds the limit.

How to avoid exceeding the concurrent limits?

To avoid exceeding the concurrent limits, you can take the following steps:

  • Batch Your Requests: Instead of making multiple requests at the same time, batch them together to reduce the number of concurrent requests.
  • Use Asynchronous Processing: Use asynchronous processing to offload tasks that can be executed in the background, reducing the load on the system.
  • Optimize Your Code: Optimize your code to reduce the amount of time it takes to execute, reducing the likelihood of exceeding the CPU time limit.
  • Monitor Your Usage: Monitor your usage regularly to identify areas where you may be exceeding the limits and take steps to optimize your usage.

Conclusion

In conclusion, Salesforce concurrent limits are an important aspect of the platform’s architecture, designed to ensure that the system remains stable and efficient. Understanding the different types of concurrent limits and how to avoid exceeding them is crucial for developers and administrators to ensure that their applications run smoothly and efficiently.

Table: Salesforce Concurrent Limits

Limit Default Limit Description
Long Running API Requests 10 requests per org Applies to requests that take longer than 5 seconds to complete
Concurrent Apex Requests 10 requests per org Applies to synchronous transactions executed by Apex code
CPU Time Limits 10 seconds (synchronous), 60 seconds (asynchronous) Applies to the amount of time that a single request can take to complete
Callout Limits 100 calls per transaction Applies to the number of external web services calls made by Apex code

Bullets: Ways to Avoid Exceeding Concurrent Limits

• Batch your requests to reduce the number of concurrent requests
• Use asynchronous processing to offload tasks that can be executed in the background
• Optimize your code to reduce the amount of time it takes to execute
• Monitor your usage regularly to identify areas where you may be exceeding the limits

Your friends have asked us these questions - Check out the answers!

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top