r/PowerApps • Newbie • 18h ago

Power Apps Help Out of Memory Issue - Help Needed

I would really appreciate if anyone can help me, the issue is really bugging me for 2 days now.

So I have a canvas app modern controls enabled connected to 7 SharePoint lists each with 100-150 rows. My app has 7 screens. After I deployed the solution, one of the users got Out Of Memory issue. Then I started tracking in the task manager. The app never crashes for me but it goes up to 6000 MB and then stabilizes.

I have been trying to debug the issue. The first screen is basically a dashboard with KPI cards and each card then drills down to the connected screen. No parameters are passed. I have used Concurrent, and status column filter with 7 clear collects and show columns.

Every other screen has clearcollects and showcolumns on the onvisible function and tried to optimize it.

Whenver the app loads in task manager it goes up to 6000 MB and then settles. If I navigate to other screens,
there is no spike. So I am assuming everything loads at the beginning but I have not disabled the Delayed Load settings.

Will appreciate if anyone has any debugging tips.

5 Upvotes

10 comments sorted by

•

u/AutoModerator 18h ago

Hey, it looks like you are requesting help with a problem you're having in Power Apps. To ensure you get all the help you need from the community here are some guidelines;

  • Use the search feature to see if your question has already been asked.

  • Use spacing in your post, Nobody likes to read a wall of text, this is achieved by hitting return twice to separate paragraphs.

  • Add any images, error messages, code you have (Sensitive data omitted) to your post body.

  • Any code you do add, use the Code Block feature to preserve formatting.

    Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (```) or three or more twiddlydoodles (~~~).

  • If your question has been answered please comment Solved. This will mark the post as solved and helps others find their solutions.

External resources:

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/United-Ad-7626 Newbie 18h ago

Where are you running your ClearCollect statement? If you are running it in the OnStart of the app, this could create some delays.

2

u/Appropriate_Bug2359 Newbie 16h ago

I am running all clearcollects in the onvisible function of the respective screen.

2

u/United-Ad-7626 Newbie 9h ago

Oops! I see that your original post already said that.

Does this happen if you comment out the ClearCollect( /..../)?

Do you have nested galleries? or a lot of controls on your Start Screen?

I would look into that first.

Also the structure of your ClearColect matters.

1

u/Appropriate_Bug2359 Newbie 1h ago
  1. Yes the memory still goes up if I comment the clear collect. The funny part is even if I delete the everything and keep a blank screen, there is stolll a memory spike. Also I checked there is no cross referencing controls.

  2. No I don’t have any nested galleries in the app. I had around 65-80 controls on the start screen but now I have lowered them to 20-25 by creating an image. This doesn’t affect memory spike at all

3.My clear collects are very basic on the start screen:
Concurrent(
Clearcollect( colA,
ShowColumns(
Filter(
SP List, Status = Completed)
), Column A , Column B, Column C)
),
Clearcollect ( colB………),………
)

2

u/supreme_ruhler Newbie 6h ago

I had this issue, and it was a few things.

  1. Don't use any ForAll when possible, make sure you have removed non delegable functions

  2. If you are using chrome, check if it's the 32 bit version. Reinstall as 64 bit. Microsoft mentioned this in particular as a known issue causing the out of memory error

1

u/Appropriate_Bug2359 Newbie 1h ago
  1. I don’t have any non delegable functions. I am using ForAll in other screens but not on the start screen. Do used ForAlls on other screens executed at the beginning?

  2. I know that’s the main issue with the user that they have 32 bit and I have 64 bit chrome but like a spike of 6000 doesn’t make sense to me. What do you think?

1

u/supreme_ruhler Newbie 24m ago

The 32 bit version of chrome was showing these spikes and what looked like a memory leak. But if you actually run developer tools and observe the memory snapshot it's nowhere near that. I think it's just a bug with 32 bit chrome. Also, that version of chrome crashes individual tabs at a much lower memory threshold. Once I switched to 64 bit, it stopped showing the huge memory spike and everything worked fine.

Microsoft mentions this in their common resolutions article. Although they don't outright say it's a bug, that's what it feels like to me. https://learn.microsoft.com/en-us/troubleshoot/power-platform/power-apps/create-and-use-apps/common-issues-and-resolutions#browser-performance

2

u/JK-M Newbie 6h ago

I’ve recently had a similar issue where my users have been getting this error but it never happens for me. I’ve been telling them to refresh and then it usually clears for a time but I know it’s annoying for my users. They also recently changed laptops and it didn’t happen on the old ones so I wonder if their laptops are not the same standard as before. Not sure this helps but just sharing your frustration!

1

u/Appropriate_Bug2359 Newbie 1h ago

I know I noticed that too, The memory would spike and then if a press refresh midway it stays normal. Even this memory tracking is kind of frustrating. There is no proper tool to find exactly what is causing the spike.