This question is about two questions about JSON Batching
- I found out the batch limit is 15 instead of the mentioned 20, why is the limit not mentioned on the page of JSON Batching is a question to me. If I combine 15 requests they all succeed, no problem. If I do 16 to 20 requests they random start failing. I'm I doing something wrong? I'm not using the graph client because that didn't support batching for a long time. I also created a github issue about it, but it got closed for some reason.....
- How do I suggest the raising of the limit? It would be very useful if the limit could be raised to 50 (with the limitation that they should be in the same context, like you can add/remove 50 items from a single user calendar.)
The requests I'm trying to batch are a combination of these:
- Remove item from users calendar
- Add item to users calendar
It seems that some tenants (it's a multi tenant application) have a limit of 4, our tenant has a limit of 15 which seems the average.
If I go over the mentioned 20, I get a HTTP 400 Bad Request exception. But the batch requests with between 15 and 20 "subrequests" combined, produce a HTTP 200 Ok response, with some json describing the state of the subrequests. There the 429
status shows up.
{
"id": "04",
"status": 204,
"headers": {
"Cache-Control": "private"
},
"body": null
}
vs
{
"id": "12",
"status": 429,
"headers": {
"Retry-After": "1",
"Cache-Control": "private"
},
"body": {
"error": {
"code": "ApplicationThrottled",
"message": "Application is over its MailboxConcurrency limit.",
"innerError": {
"request-id": "b919dc35-78c1-407e-8f4a-0f44f03ac707",
"date": "2019-10-08T20:03:44"
}
}
}
}
@mag382 made a nice comment about this on the closed github issue.
This is definitely still a problem, and this issue should not have been marked closed. The batch endpoint won't return a BadRequest with 16-20 requests, but the response will have the ApplicationThrottled error. Something lower in the API is throttling the concurrency of mailbox access. Either that throttle needs to be increased to match the 20 request limit of the batch, or the batch documentation and validation needs to be brought down to 15.