cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

504 Bad Gateway using Get Rows SQL function

Hello everyone,

 

I've been receiving the 504 Bad Gateway error for at least an entire month now on a flow that was working perfectly before. I know there are plenty of threads on this already, but none have been able to solve my issue, and so maybe this is a different scenario.

 

The flow is meant to grab ~10,000 rows of data from our Azure SQL server once a day and place it into a fresh file in our SharePoint. However, this 504 error occurs when it is using the Get Rows SQL function. Thing is, I have another flow that does the exact same thing as this except it pulls a different SQL view's ~5,000 rows of data.

 

The flow that works takes 20 seconds maximum, always successful. Same actions, same database, different view. This problematic flow has typically taken 5 minutes to run successfully, but as of late takes roughly 10 minutes to fail with default settings, and over an hour to ultimately fail after I played with the retry policy.

 

Any ideas? Thank you for your help.

 

Flow504.PNGFlow504 2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: 504 Bad Gateway using Get Rows SQL function

Hi @FlowingRiver,

 

The issue is caused by the return rows over the limitation of the response size, the response size limit is 8MB through the on-premises SQL server:

https://docs.microsoft.com/en-us/connectors/sql/#known-issues-and-limitations

 

There is no a fixed rows number of limitation, caused it also influenced by the column size:

https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html

 

So, please make sure each time Get rows, the rows wouldn't oversize the response size.

 

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

 

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: 504 Bad Gateway using Get Rows SQL function

Hi @FlowingRiver,

 

The issue is caused by the return rows over the limitation of the response size, the response size limit is 8MB through the on-premises SQL server:

https://docs.microsoft.com/en-us/connectors/sql/#known-issues-and-limitations

 

There is no a fixed rows number of limitation, caused it also influenced by the column size:

https://dev.mysql.com/doc/refman/8.0/en/column-count-limit.html

 

So, please make sure each time Get rows, the rows wouldn't oversize the response size.

 

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

 

View solution in original post

Highlighted
New Member

Re: 504 Bad Gateway using Get Rows SQL function

@v-litu-msft Hello, and thank you for your help. The last successful pull from this SQL view using Flow was a CSV file containing 9950 rows and 144 columns. The file size was 8511 KB. I would imagine this is over the limit. How would I check the response size?

Highlighted
Community Support
Community Support

Re: 504 Bad Gateway using Get Rows SQL function

Hi @FlowingRiver,

 

The 8MB is a response limitation, if you store the data into a file, such as an Excel file, it will be bigger than the original JSON format.

Get the file size, you could use Get file metadata if it is store in the SharePoint.

 

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

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

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

thirdimage

Power Automate Community User Group Member Badge

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

Users online (7,673)