Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

SFTP Get File Content Timeout


We're encountering 504 Gateway timeout for in the SFTP "Get file content" step for files below 50MB.


The documentation says the limit is 50mb. Kindly advise.


  "error": {
    "code": 504,
    "source": "",
    "clientRequestId": "f5eba0ed-3831-45cd-ac7c-919e0d245d3e",
    "message": "BadGateway",
    "innerError": {
      "status": 504,
      "message": "Request to the SFTP server 'xxxxx(obfuscated)' has timed out.\r\nclientRequestId: f5eba0ed-3831-45cd-ac7c-919e0d245d3e",
      "source": ""



Dual Super User
Dual Super User

Re: SFTP Get File Content Timeout

Hi @jarellm 


Can you please post a screenshot of the flow configuration. Although your file is less than 50MB, it still could be a huge one and the action might be taking a lot of time to retrieve the content. You can increase the timeout by changing the settings in the action as shown in the screenshot below:hah.PNG

This is my sharepoint get file content action. You can access the settings n your SFTP action by clicking the ... on the top right corner of the action and click settings. Enter P1D so that the time out increases to 1 day. Run the flow and see if you continue to get the same error. 


Hope this Helps!


If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Level: Powered On

Re: SFTP Get File Content Timeout

Thanks for the suggestion @yashag2255 


I did try this for a file well over 50mb but it still failed so maybe the timeout will work this time for a smaller file.


Will give it a try.

Level: Powered On

Re: SFTP Get File Content Timeout

@yashag2255 Unfortunately that stil did not work.




Community Support Team
Community Support Team

Re: SFTP Get File Content Timeout

Hi @jarellm ,


Have you tested other actions of SFTP connector?

MS Flow does have a limit on the size of the file content. If it exceeds 50M, the execution result may not meet expectations.

From the point of view of error message reporting, it seems that this is also related to the connection you created, and Request display timeout.

You could try to create a new connection based on the link below and use a file below 50M for testing.



Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources


New Ranks and Rank Icons in April

Read the announcement for more information!


Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Kudoed Authors
Users online (9,203)