locked
HTTP request timeout RRS feed

  • Question

  • Hi,

    How long will API Management wait on an HTTP request which calls a long-running backend service before timing out?  I can't see this in the documentation.

    Many thanks,

    Mark

    Thursday, April 21, 2016 10:07 AM

All replies

  • Hi Mark,

    Thank you for posting here!

    The timeout property is an attribute in the web service.

    1. timeout="integer" --> The timeout interval in seconds before the call to the backend service fails.  Default: No timeout

    2. follows-redirects="true | false" --> Specify whether redirects from the backend service are followed by the gateway or returned to the caller.   Default: false

    You can set timeout attribute in different ways:

    1. Through code by mention the property as shown:

    ApplicationConnection.RequestTimeoutSeconds = 120;

    2. Through web.config file as shown:

    <appUserSettings>

                        <add key="defaultRequestTimeout" value="120">

    </appUserSettings>

    Here is a good article for API management advanced policies.

    For more information, kindly refer the link given below:

    https://msdn.microsoft.com/en-us/library/ff647786.aspx#scalenetchapt10_topic14

     

    Regards,

    Pradeep

     

     If a post answers your question, please click Mark as Answer on that post and Vote as Helpful.

    Friday, April 22, 2016 4:01 AM
  • Hi Mark, by default the gateway waits infinitely. 

    You can set the timeout in the forward-request policy. 

    https://msdn.microsoft.com/en-us/library/azure/dn894085.aspx#ForwardRequest

    Monday, May 9, 2016 6:03 PM