[BUG] OutOfMemory Exception using Get-PnPPlannerTask -Bucket #3127
Unanswered
TStZuerich
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm facing issues loading all tasks from a bucket in an Azure Runbook, which is capped at 400MB RAM.
The moduel version is 2.1.1, runtime is 7.2.
Not sure if this can be solved in the cmdlet, but maybe a dev can have a look into the issue.
This code runs into an OutOfMemory Exception
$tasks = Get-PnPPlannerTask -Bucket $myBucket
https://github.com/pnp/powershell/blob/dev/src/Commands/Utilities/PlannerUtility.cs#L426
where as this code has no issues
$tasks = Get-PnPPlannerTask -Group $groupId -Plan $planId | Where-Object { $_.BucketId -eq $myBucket.Id }
https://github.com/pnp/powershell/blob/dev/src/Commands/Utilities/PlannerUtility.cs#L90
The difference in in the Cmdlet, resp. the PlannerUtility is that the request on bucket tasks also checks for the NextLink and loads more tasks.
"Get-PnPPlannerTask -Group $groupId -Plan $planId" does load 506 tasks in my example.
Is this an issue with the collection, using more memory by adding than using a single toList().
Beta Was this translation helpful? Give feedback.
All reactions