3

In an application I'm working, from time to time I see throttling related errors. In some cases I get a 429 error, like this:

429 TOO MANY REQUESTS.

However, I also get errors, with only the HTTP code 429, without the response body or any details about what went wrong. Because of that, I guess it's not about the sheer number of request, but possibly something else.

Here is the code doing the job for me: https://gist.github.com/hariso/3bd6613316960c8824a6bca0236ac7ff

How can I find the exact reason for getting those 429s without response bodies?

2 Answers 2

3
+25

"429 TOO MANY REQUESTS" itself a detail error message. It says that you are exceed of request limit for particular time.

Normally this error comes when you try to request more than 1 request in 1 second.

So the thing you can do is go through Avoid getting throttled or blocked in SharePoint. It may give you the basic idea behind this error and you may find out why this error is generated.

Also there are some option specified here.

Also

This is something common with the REST services. It returns the 429 code when a single user make too many requests within a single time.

The real reason behind the 429 error is exceeding the throttling limit. In many sources it is mentioned that this happens when SharePoint keeps receiving more than a request per second for a continuous amount of time. But REST API is just one way of exceeding the throttling limit for the user. The CSOM which uses the same endpoint is the next most famous.

Source : Response 429 for SharePoint REST API

2
  • Thanks for taking time to reply! My confusion is about that message. My confusion is about responses which are 429, but have no response body. Commented Aug 12, 2016 at 14:55
  • I am working on it, Let you know as soon as i come up with solid reason. Commented Aug 12, 2016 at 17:22
1

your returning too many requests from the rest api. try reducing the ammount of data so you dont hit the user throttling quota:

$select=Modified,Created,FileRef,FileDirRef,FileLeafRef,FileSystemObjectType,UniqueId,Author/Title,Author/Name,File/Length",
        "$expand=Author,File",

do you need to return all of these?

also sounds like a large list returning a max of 1000 items is a lot with all those fields. try indexing the modified field as your filtering based on that field.

if you have to try and index those columns you want to search/filter/sort by.

if you have 10,000 items in the table and your filtering by the modified field which is not indexed it will go through the full 10,000 records and set a lock on the database end and will 100% hit list view throttling set in central admin for list queries which by default set at 5000.

debugging rest calls is not easy but some tools like fiddler which i use is helpfull.

this might help you in the right direction:

https://stackoverflow.com/questions/165720/how-to-debug-restful-services

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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