03 February 2016

Quiddity - the 'whatness' of concurrent Apex limits in Event Monitoring


I had to look that one up. One of our awesome architects here at Salesforce, Peter Wisnovsky, came up with it.

Quiddity is defined by Wikipedia as the essence of an object. Literally its "whatness" or "what it is".

What the?! Why not just call it 'type', 'category', or 'dimension'? I asked Peter and he told me that 'type' was too overloaded. I personally just think it's because 'type' was too boring whereas 'quiddity' is supercalifragilisticexpialidocious!

Regardless it turns out that understanding an Apex class's quiddity is pretty important when determining whether you've hit the synchronous concurrent Apex limit.

From the Apex Developer's Guide,
"The Concurrent Apex Limit is the number of synchronous concurrent requests for long-running requests that last longer than 5 seconds for each organization. If more requests are made while the 10 long-running requests are still running, they’re denied. Of which, each org has a limit of 10."
What this really means is that when the limit is exceeded, users may receive the following error which can seem confusing to an end-user or even an admin:
"Unable to Process Request.  Concurrent requests limit exceeded.
To protect all customers from excessive usage and Denial of Service attacks, we limit the number of long-running requests that are processed at the same time by an organization. Your request has been denied because this limit has been exceeded by your organization. Please try your request again later."
There's a great blog post on the engineering developer blog by the former blimp pilot, John Tan, that goes into more detail about what this limit is and how to work with it.

The quiddity log attribute is key to unlocking an Event Monitoring query to find out which Apex classes have the potential to hit the concurrent Apex limit in your org. Well, that's pretty darn useful, so we added the quiddity attribute to the ApexExecution file type in the Spring '16 release.

There are two reasons why you might run into the concurrent Apex limit:
1. High callout time <--- Probably the most common cause!
2. High database time

If the cause was a high callout time, you can filter your ApexExecution file based on QUIDDITY (E, H, M, R, V, W, X, L, K, or I) and CALLOUT_TIME (>5000), both of which were added in the Spring '16 release.

Example of how you can use Quiddity and Callout Time to identify Apex classes
If the cause was a high db time, you can filter your ApexExecution file based on the QUIDDITY (E, H, M, R, V, W, X, L, K, or I) plus where RUN_TIME>5000.

The values for quiddity in the logs include:

A - Legacy Batch Apex
C - Schedule Apex
E - Inbound Email Service
F - Future
H - Apex REST
I - Invocable Action
K - Quick Action
L - Aura
M - Remote Action
Q - Queuable
R - Synchronous
S - Serial Batch Apex
T - Apex Tests
TS - Synchronous Apex Tests
TA - Asynchronous Apex Tests
V - Visualforce
W - SOAP Webservices
X - Execute Anonymous

This won't exactly tell you where you did hit the limit, but it will at least identify which synchronous Apex classes run longer than five seconds and probably should be optimized using the tips provided John's blog post.

In addition to quiddity, we also added EXEC_TIME to ApexTrigger files in order to get the run time of each trigger execution instead of RUN_TIME which turns out not to store any values in production. Who knew?!


  1. Hi, is EXEC_TIME measured in seconds? I cannot find the details on https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_eventlogfile_apextrigger.htm

  2. Hi, how to query quidity of an Apex exc? is is possible in dev console?can you give an example pls

  3. It is only recently that Salesforce published a blog giving details regarding the sort of companies that are making use of solution the foremost . the very fact remains almost every sort of companies spanning across different niches and industries are making use of platform for his or her business. Most of the businesses having Salesforce implemented in to their business are often mainly classified in to 3 categories. Studies suggest the Salesforce customer base varies greatly with most quite businesses preferring Salesforce Implementation. has become increasingly important for all businesses to utilize the potential of the Salesforce solution within the market with the assistance of some Salesforce.

    Cheap Essay Writing Service


  4. Thanks for giving me such amazing information. Keep sharing again with the informative post.
    If you are unable to access your Verizon email account, but you forgot your email password, or your email account gets hacked or blocked. Then, you may Change Verizon Email Password and easily access your Verizon account. If you have no idea how to change your Verizon email account password so, you can dial our toll-free number and talk to our experienced professionals. Our expert is always available to provide exact solutions related to your issues.

  5. I read your post. Your post is too informative. Thanks for sharing.
    If you try to login into your AOL Email Account. But you are unable to access them. In this situation, You have to Reset or Change AOL Password Online and easily access your AOL account. You may directly connect to our experts via a toll-free number.

  6. The slam was superb. We made cheerful and entertained ourselves through the evening. The ordinarily French toll, comprising of bouillabaisse, vol-au-vent, sheep quiche, pork au gratin, foie gras, and cassoulet alongside truffles and different sweets, won't ever be forgotten by any of us who went to his birthday event.420 events nj