Skip to content

What is the best way to deal with HTTP 429 - Throttled - requests with PnP ? #62

Discussion options

You must be logged in to vote

In principle there is nothing you need to do to handle 429s. PnP PowerShell makes use of the PnP Framework behind the scenes where we override way CSOM work with it comes to executing requests. We implemented an incremental backoff flow which means that if a 429 comes in we initially wait 0.5 seconds. Then we try again. If it still fails, we wait 2x0.5 seconds, then 2, then 4, then 8, then 16, 32, 64, 128, 256 seconds. We try up to a maximum of 10 times before giving up. That means that maximum wait time before we give up is 512 seconds, meaning more than 8 minutes. This delay has shown to handle the throttling errors is almost every case. We have seen that this covers throttling nicely.

D…

Replies: 4 comments 24 replies

Comment options

You must be logged in to vote
8 replies
@erwinvanhunen
Comment options

@erwinvanhunen
Comment options

@erwinvanhunen
Comment options

@erwinvanhunen
Comment options

@pbjorklund
Comment options

Answer selected by MartinHatch
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
14 replies
@MartinHatch
Comment options

@MartinHatch
Comment options

@erwinvanhunen
Comment options

@AndersRask
Comment options

@AndersRask
Comment options

Comment options

You must be logged in to vote
2 replies
@AndersRask
Comment options

@smajchrz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants