11

We call the following endpoint at the same time each day to get a count of our daily async executions to track our usage.

/services/data/v50.0/limits

The following response gives us the # of daily async executions like so:

"DailyAsyncApexExecutions" : {
    "Max" : 486000,
    "Remaining" : 470645
}

I noticed on days we deploy to production, that our number shoots considerably higher (600% more executions). I'm just looking for an explanation to why and whether we need to consider this when looking at the limit and how close we generally are to it.

We run our tests/validate the package a day or two before actual deployment (then use quick deploy) so it doesn't seem to be the tests (likewise, I see that tests that run for a deployment run synchronously).

My only hunch is that Salesforce holds transactions that are occurring when the deployment tries to deploy and runs them async after the deployment is complete? In which case, I presume the increase depends on the activity level of the org while you're trying to deploy.

Questions:

  1. For deployments, is there expected to be a large increase in async apex execution?
  2. If it's expected, do we need to take this into consideration with our daily usage and how close we are to the limit?
0
1

Ended up working with Salesforce Support on this one. They were able to provide a graph of the async executions throughout the day and the job with the most executions. This led me to discover that there was a large dataload process that happened to coincide with our release days (done later in the day) since I started tracking this limit. This process typically does not occur on release days so I would've eventually seen this trend break, but I was unaware these large loads were occurring and triggering a future method.

As such, there is no expectation of an increase in async apex executions from a deployment - regardless of user activity during the deployment. The rep mentioned there's no mechanism I was implying in my question (to hold synchronous transactions during a deployment) and simply stated that

all async processes are put in the queue and processed per resource availability

However, I think it's safe to assume to expect delayed async executions as resource availability is probably affected during a quick deploy/deployment.

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.