cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sakura
Helper I
Helper I

Respond to a PowerApp or flow time limit

Please increase the current time limit of 2 mins for the function 'Respond to a PowerApp or flow' time limit.

 

We have a file that gets uploaded, validated and parsed after pressing a button in Power Apps. It's ok if this process takes 4 mins or even more. The process is as optimized as possible. We even have custom functions in TypeScript to avoid the inefficient Apply for Each loops. But the current time limit doesn't allow us to tell the user that the upload was successful or not.

 

I can create another way to notify the user when the upload is complete, sure, but why is the time limit set so conservatively? 2 mins is really not a lot. And why can't we increase it? To be blunt, it makes this function almost useless for critical data intensive processes where you want to use Power Apps for a friendly user interface.

1 ACCEPTED SOLUTION

Accepted Solutions
neerajsu
Helper I
Helper I

This is a pretty common problem you'll run into a lot. 2 mins is actually quite a lot. Most gateways will timeout at 60 seconds. Remember that this a http call. It doesn't use websockets. It is very inefficient to have long open http sessions running on the load balancer. After 60 seconds its best practice to move to async/polling or websockets. If data transfer to your endpoint itself is taking too long then you need to use chunking. In your case data transfer doesn't seem to be the problem, so you don't have to worry about chunking.

Anyway I don't want to digress too much into technicalities, but wanted to let you know, that your request for increasing timeout will never be fulfilled. 120 seconds itself is a little out of the usual industry standard for web apis.

I'd suggest a good workaround. Respond to power app immediately after upload. Remember that you can have a 'respond to power app or flow' step and keep having steps underneath it. When you do that, flow will respond to power apps and continue running other steps. You can also call a child flow if you are using a CDS solution.

Once your power apps receives this initial success message, create a timer control and calls another flow every 10 seconds, where you look for success/failure when all your file processing/validation completes. When your first flow completes process, it can update a Sharepoint list or some database which the 2nd flow can get information from.

Hope that solves your problem

In some cases the processing might fail completely. To help with that case, have a limit on polling. So stop polling after 5 mins.

View solution in original post

4 REPLIES 4
rsaikrishna
Dual Super User
Dual Super User

@Sakura 

 

From your flow, where are you uploading the file? SharePoint List/Library OR SQL Server OR some other place?

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.
Sakura
Helper I
Helper I

@rsaikrishna 

The file is uploaded to a Sharepoint site linked to a Teams group. The problem is not the upload. The flow needs to validate tables and then copy the content to a Dataverse for Teams. This is also not a problem. Just takes time to do.

The problem is the time limit of 2 minutes. It prevents me from sending a result back to Power Apps.

neerajsu
Helper I
Helper I

This is a pretty common problem you'll run into a lot. 2 mins is actually quite a lot. Most gateways will timeout at 60 seconds. Remember that this a http call. It doesn't use websockets. It is very inefficient to have long open http sessions running on the load balancer. After 60 seconds its best practice to move to async/polling or websockets. If data transfer to your endpoint itself is taking too long then you need to use chunking. In your case data transfer doesn't seem to be the problem, so you don't have to worry about chunking.

Anyway I don't want to digress too much into technicalities, but wanted to let you know, that your request for increasing timeout will never be fulfilled. 120 seconds itself is a little out of the usual industry standard for web apis.

I'd suggest a good workaround. Respond to power app immediately after upload. Remember that you can have a 'respond to power app or flow' step and keep having steps underneath it. When you do that, flow will respond to power apps and continue running other steps. You can also call a child flow if you are using a CDS solution.

Once your power apps receives this initial success message, create a timer control and calls another flow every 10 seconds, where you look for success/failure when all your file processing/validation completes. When your first flow completes process, it can update a Sharepoint list or some database which the 2nd flow can get information from.

Hope that solves your problem

In some cases the processing might fail completely. To help with that case, have a limit on polling. So stop polling after 5 mins.

View solution in original post

@neerajsu 

Thank you very much for that detailed insight. Though I'm aware these restrictions are in place due to resource limits that always come with an SaaS platform like this, it is nonetheless a very limiting one. As you suggested, it requires a huge and clunky workaround, negating the 'user-friendliness' this platform is supposed to offer vs working in a general programming language. I'm a full-time developer but cannot see citizen-developers going through all that trouble in a workday with limited working hours. But granted, I am pushing the envelope here.

I already use your 'progress in a database' approach for flagging an active process and will indeed need to consider it for the response as well. Thank you.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (3,820)