web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / GatewayTimeout error w...
Power Automate
Unanswered

GatewayTimeout error when running stored procedure

(0) ShareShare
ReportReport
Posted on by 13

I am trying to create a flow which will run a stored procedure on an Azure database.  When running the procedure on the server, it takes approximately 1 minute to complete.  When I run it using either the SQL server or Azure Data Warehouse actions to Execute Stored Procedure, I get a timeout error.

 

Even though the settings say that the item is running asynchronously, it doesn't seem to have actually started the procedure as no data is updated on the server.  I don't actually need a result set, so if it's possible to get it run truely async, that would do as a solution, or if I can get the timeout increased.

 

I have run a simple SQL statement (select getDate()) on the connection so there is no problem reaching or getting responses from the server.

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    on at
    Re: GatewayTimeout error when running stored procedure

    Hi @JoHacker ,

     

    Could you share the details of the Flow configuration?

    I can't reproduce a similar issue on my side.

    You could try to update the connection and check if a similar problem still exists.

     

    Best Regards,

  • JoHacker Profile Picture
    13 on at
    Re: GatewayTimeout error when running stored procedure

    Sure.  Here is what the flow itself looks like:

     

    Flow configurationAnd here are the settings for the Execute stored procedure task:

     

    Settings for the exec action

    When I've got the exec part working, the manual trigger will be replaced with a schedule, but for the moment, I just want to get this part working!

  • Verified answer
    JoHacker Profile Picture
    13 on at
    Re: GatewayTimeout error when running stored procedure

    For anyone looking at this via Google, it turned out this was being caused by the Flow using a corrupted query plan that's not used by SSMS.  To fix it, I switched to using an SQL query (rather than the exec stored proc task) and set the query to "set arithabort on; exec stored_proc_name;" and that worked like a charm.

  • srduval Profile Picture
    1,760 Moderator on at
    Re: GatewayTimeout error when running stored procedure

    @v-bacao-msft I'm having the same problem as the original poster. Using the execute stored procedure action, it runs forever before finally timing out with a gateway error. sp only takes a minute or two on the azure server directly 

  • AdilAlhilali Profile Picture
    2 on at
    Re: GatewayTimeout error when running stored procedure

    in my case, There was an issue with the SQL stored procedure as it was returning more than 1 select statment (more than 1 table) which resulted in the exact errors mentioned in this post

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard