Forum Discussion
PnP Retry behavior
- Nov 20, 2017
The Connect-PnPOnline cmdlet as such will not retry, but internal calls to the API -might- if there is a case of throttling. But only in case of throttling (server load too high). If the server sends a throttling exception the ExecuteQueryRetry call made in Core will try 10 times, the first time waiting 500 msecs, then 1000msec, then 2000msec, 4000msec etc. These values are specified in the Core library.
You can also set in PnP PowerShell a requirement for a certain server health score, and how many seconds it should wait before retrying and how many times it should retry. But that does not apply to the Connect-PnPOnline cmdlet itself but to other cmdlets used -after- connecting. These settings you make by specifying the MinimalHealthScore, RetryWait and RetryCount parameters.
The Connect-PnPOnline cmdlet as such will not retry, but internal calls to the API -might- if there is a case of throttling. But only in case of throttling (server load too high). If the server sends a throttling exception the ExecuteQueryRetry call made in Core will try 10 times, the first time waiting 500 msecs, then 1000msec, then 2000msec, 4000msec etc. These values are specified in the Core library.
You can also set in PnP PowerShell a requirement for a certain server health score, and how many seconds it should wait before retrying and how many times it should retry. But that does not apply to the Connect-PnPOnline cmdlet itself but to other cmdlets used -after- connecting. These settings you make by specifying the MinimalHealthScore, RetryWait and RetryCount parameters.