Showing results for 
Search instead for 
Did you mean: 
Helper V
Helper V

HTTP status code 504 Gateway Timeout

Hi Guys,

I recently got some help with a Reminder Loop , and since I implemented the solution my flow has been failing with error message:

The execution of template action 'Respond_to_a_PowerApp_or_flow' is failed: the client application timed out waiting for a response from service. 
This means that workflow took longer to respond than the alloted timeout value. 
The connection maintained between the client application and service will be closed and client application will get an HTTP status code 504 Gateway Timeout.

It doesn't always fail, but when it does it's only the last action (respond to power app or flow) that fails and the rest of the actions complete successfully.

Here is what my flow looks like:


Here is a screenshot of the error I am getting:

Annotation 2021-07-05 185922.jpg

Please help 😟

Resident Rockstar
Resident Rockstar

Seeing as the approval action could run for 30 days - would it not be better to update a status in a data source and have power apps check that data source when the user is interacting with it?

Community Support
Community Support

Hi @JimJim 

Does your flow running longer than 1 minute?
These long running flows called from Power Apps will time out after one minute.
Please refer to link below to see if it could helps.

Best Regards

If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-LilyW-msft ,

My flow isn't being called by Power Apps, it gets called from a parent flow which runs on schedule every hour. Before I edited my reminder loop the flows would run for days without this issue, now all of a sudden it is failing

Edit: When the flow doesn't fail, I notice that it skips the 'respond to power app or flow' action, like so:

respond to flow skipped.jpg

But sometimes I get this error message instead:

Annotation 2021-07-05 185922.jpg

The trouble is that there doesn't seem to be any consistency between completing successfully and completing with error

Helper V
Helper V

Just to add an observation...

For the purposes of testing, I set my reminder loop to run every 1 minute and send the reminder email every 5 minutes. After I respond to the approval it takes a few seconds to complete the rest of the flow, if I approve it just before the next reminder increment and the reminder loop finished before the rest of the flow, this is when I get the error message. However, if the flow reaches the 'respond to power app or flow' before the reminder loop finishes then it completes successfully.

I have no ides why this happens or if this is the expected behaviour, but in production the reminder loop will increment much less frequently and I don't expect this to be an issue

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,215)