Home

Get-PnPTerm - "The request channel timed out" - how to retrieve terms from large termsets

%3CLINGO-SUB%20id%3D%22lingo-sub-563618%22%20slang%3D%22en-US%22%3EGet-PnPTerm%20-%20%22The%20request%20channel%20timed%20out%22%20-%20how%20to%20retrieve%20terms%20from%20large%20termsets%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-563618%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20using%20Get-PnPTerm%20cmdlet%20to%20retrieve%20all%20terms%20from%20a%20term%20set%20containing%20about%2070%2C000%20terms%2C%20it%20very%20often%20fails%20with%20the%20below%20time%20out%20message%3A%3C%2FP%3E%3CPRE%3E%22Exception%20calling%20%22ExecuteQuery%22%20with%20%220%22%20argument(s)%3A%20%22The%20request%20channel%20timed%20out%20while%20waiting%20for%20a%20reply%20after%2000%3A00%3A29.8593156.%20Increase%20the%20timeout%20value%20passed%20to%20the%20%3CBR%20%2F%3Ecall%20to%20Request%20or%20increase%20the%20SendTimeout%20value%20on%20the%20Binding.%20The%20time%20allotted%20to%20this%20operation%20may%20have%20been%20a%20portion%20of%20a%20longer%20timeout.%22%3C%2FPRE%3E%3CP%3EI%20need%20to%20retrieve%20such%20list%20once%20per%20day.%26nbsp%3B%20Tried%20with%20getting%20context%20first%20(Get-PnPContext)%20then%20setting%20high%20RequestTimeout%20value%2C%20loading%20and%20executing%20query%2C%20but%20that%20doesn't%20help.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20there%20any%20better%20ways%20to%20retrieve%20these%3F%20Maybe%20in%20batches%3F%20I%20have%20been%20trying%20a%20lot%20of%20different%20approaches%20but%20can't%20get%20there.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E
Michal Sacewicz
Occasional Contributor

When using Get-PnPTerm cmdlet to retrieve all terms from a term set containing about 70,000 terms, it very often fails with the below time out message:

"Exception calling "ExecuteQuery" with "0" argument(s): "The request channel timed out while waiting for a reply after 00:00:29.8593156. Increase the timeout value passed to the 
call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout."

I need to retrieve such list once per day.  Tried with getting context first (Get-PnPContext) then setting high RequestTimeout value, loading and executing query, but that doesn't help. 

 

Are there any better ways to retrieve these? Maybe in batches? I have been trying a lot of different approaches but can't get there.

 

Thanks

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies