skip to Main Content

I’m looking for a way to set explicitly a connect timeout (not a timeout for my backend service) on APIs hosted on azure APIm

anyone has already tried ?

2

Answers


  1. You can leverage the timeout attribute available in the forward-request policy. This is an optional attribute with default value of 300 seconds (5 minutes).

    More Information:
    Timeout attribute refers to the time in seconds to wait for HTTP response headers to be returned by your backend service before a timeout error is raised.

    Also note that the timeout value greater than 240 seconds may not be honored, this is because underlying network infrastructure can drop idle connections after this time. Minimum value for this is 0 seconds and default value is 300 seconds. Hope this helps.

    Login or Signup to reply.
  2. You can leverage the Send-request inbound policy with the timeout property which sends request to the specified URL, waiting no longer than the set timeout value. The default timeout for this is 60 seconds. Also mention the mode attribute as new which is the default value.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search