1

Salesforce says:

Batch limit You can submit up to 10,000 batches per rolling 24-hour period. You can’t create batches associated with a job that is more than 24 hours old.

How can I monitor my batch api usage and how close I'm getting to my 24hr limit? Can this be done through the user interface somewhere I'm not seeing?

2

As per the documentation the batch API usage limit is calculated as

The maximum number of asynchronous Apex method executions (batch Apex, future methods, Queueable Apex, and scheduled Apex) per a 24-hour period

The limit class does have getAsyncCallsLimit but looks like it is reserved for future and not yet implemented .

and the exact limits is as below

250,000 or the number of user licenses in your organization The maximum number of asynchronous Apex method executions (batch Apex, future methods, Queueable Apex, and scheduled Apex) per a 24-hour period1 multiplied by 200, whichever is greater

So this limit is not actually from the batch apex and instead a bulk API limit .

Your Apex might be using bulk API and bulk API can be monitored only via the Bulk API monitor page in the set up .

| improve this answer | |
  • Here's a query I came up with: "SELECT sum(TotalJobItems) FROM AsyncApexJob WHERE CreatedDate = last_week AND JobType = 'BatchApex'" But that returns just over 1000 job items. Yesterday I was receiving a warning indicating that I had exceeded the 24 hour limit. I created a lot of batch items last week. Perhaps my query is incorrect in some way or this isn't the right place to get the information I'm looking for. – SF1Dev Sep 25 '16 at 13:13
  • @SF1Dev Your query should fetch only batch jobs in last 24 hours .I think you need to say date greater than YESTERDAY and less than TODAY to get accurate no – Mohith Shrivastava Sep 25 '16 at 15:49
  • 1
    Yeah, that's true however the point I was making here is that even when I requested batch jobs for the whole of last week, I got back nowhere near 10k and yet I had exceeded the 10k limit according to Salesforce. So I don't think this query is accurate or else I'm "doing it wrong". – SF1Dev Sep 26 '16 at 0:46
  • Updated the answer .Looks like it is Bulk API limit thats hitting and you may want to look at Monitor Bulk load page for this . – Mohith Shrivastava Sep 26 '16 at 1:00

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.