5

The title is one of the limits of salesforce.

Link : https://www.salesforce.com/us/developer/docs/pages/Content/pages_apex_governor_limits.htm

but I'm not understanding in a full way the meaning of this limit and I'm not finding enougth use-cases explanation on the web...

anyone can give me some examples to understand this limit:

  • For example what mean exactly "concurrent requests", mean any server operation type ?
  • In the 5 seconds what is considered ? Apex code after the request, Trigger operations? Query time execution, Callout transaction time?
  • How Salesforce understand that one transaction is going to take more than 5 seconds?
  • What time of best practises must be considered to avoid this limit?

Thnks, Klodjan

5

The two main examples, and I'm sure there are more that I am missing, of a concurrent request include:

  • A trigger exercising apex not operating in @future context
  • A Visualforce page and corresponding controller/extension code not operating in @future context

At it simplest terms, a concurrent request is a single transaction that must execute in real time (i.e. is not queued) and consumes server processor cycles to do so.

The 5 seconds is from the start of the order of execution to the end, as defined in the Triggers and Order of Execution document: https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_triggers_order_of_execution.htm

If you've ever looked at your debug log for a trigger firing, you would see that Salesforce has the exact start time of your transaction, as well as the finish time, that is how they record the overall transaction time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.