0

I have a web.config that looks like so, and is added as a link to a number of applications in my solution:

<configuration>
  <!-- For more info to customize the asp.net core module see https://go.microsoft.com/fwlink/?linkid=838655 -->
  <system.webServer>
    <!-- As connection proxy request contains double escape sequence, we need to enable it. background Azure ARM Apis are enabled it.  -->
      <security>
      <requestFiltering allowDoubleEscaping="true" />
    </security>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
    </handlers>
    <aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile="\\?\%home%\LogFiles\stdout"/>
  </system.webServer>
</configuration>

One of the services has potential for long running single requests, and so I want to increase the IIS request timeout for that service, which can be achieved by adding to the aspNetCore configuration like so:

<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile="\\?\%home%\LogFiles\stdout" requestTimeout="00:10:00"/>

However, given this web.config is otherwise shared and I don't want to alter the behaviour of my other apps, I'd like configure this via an application setting from my arm templates.

When I attempt something like the following, I get an error that %REQUEST_TIMEOUT% is not a valid time, and deploying fails to startup the webapp.

How can I enable app settings to insert into the request timeout field?

2 Answers 2

0

Azure App Service doesn't allow increase requestTimeout, the limit is 230 seconds - see Why does my request time out after 230 seconds?.

I would recommend looking at the Polling (link2) - it is the standard REST-pattern to process long running op.

Other resources:

Sign up to request clarification or add additional context in comments.

1 Comment

Our iis log outputs indicate IIS is timing out requests at ~120 seconds. we see: sc_status:502, sc_substatus:3, sc_win32status:12002, time_taken: 120221. Do you know what could cause a premature rejection from iis? Elsewhere we follow LRO semantics, however it's awakward for this API and we were hoping for a quick fix
0

If you are using Azure DevOps, some options during deployment:

  1. "XML variable substitution" can be enabled during deployment if you are using Azure App Service deploy task.

  2. Add powershell task to change the request timeout with the value from a pipeline variable.

Note: If the requestTimeout is set to say 10 mins in web.config, the request will continue to run to completion even after 230 seconds. But the client will be terminated by the app service at 230 seconds and will receive an error.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.