How do I increase the idle timeout for an Azure Web Application?

Barker, Nick 5 Reputation points
2024-07-11T10:20:57.1666667+00:00

Hi,

I want to set the idle timeout for an azure web app and I'm struggling.

I've tried to follow guides and I'm not having much luck.

Does a CA policy actually work or does this have to be set via Powershell commands?

Any help is appreciated.

I'm hoping that someone has done this and can help!!

Thanks in advance

Nick

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,632 questions
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
964 questions
{count} vote

2 answers

Sort by: Most helpful
  1. ajkuma 26,626 Reputation points Microsoft Employee
    2024-07-11T12:22:41.6+00:00

    Barker, Nick, To better assist you on this issue, kindly provide the following info:

    Based on my understanding of your scenario, as I understand you have provisioned your webapp on Azure App Service. What specific timeout are you referring to? What is the exact scenario are you attempting to accomplish? Do you receive any specific error message?

    1. Always On: To prevent your web app from being idled out due to inactivity, you can enable “Always On.” Navigate to your app service in the Azure portal, go to the Configuration blade, and turn on “Always On.” Note that this feature requires at least the Basic SKU.
    2. SCM_COMMAND_IDLE_TIMEOUT: If you want to set a specific timeout value, you can configure the SCM_COMMAND_IDLE_TIMEOUT setting. This value determines how long the SCM process waits for an idle command before timing out. For example, you can set it to 3600 seconds (one hour) by adding this setting in your app’s configuration.

    Additionally,

    Azure Load Balancer has a default idle timeout setting of four minutes. This setting is generally a reasonable response time limit for a web request. so, App Service returns a timeout to the client if your application does not return a response within approximately 240 seconds (230 seconds on Windows app, 240 seconds on Linux app). If your web app requires background processing, we recommend using Azure WebJobs. The Azure web app can call WebJobs and be notified when background processing is finished. You can choose from multiple methods for using WebJobs, including queues and triggers.

    Checkout this doc for more info: Application performance FAQs for Web Apps in Azure

    Kindly let us know, I'll follow-up with you further.


    If the answer helped (pointed, you in the right direction) > please click Accept Answer - it will benefit community members to find the answers quickly. 


  2. Neuvi Jiang 1,450 Reputation points Microsoft Vendor
    2024-07-12T07:48:28.7966667+00:00

    Hi Barker, Nick,

    Thank you for posting in the Q&A Forums.

    If your web application is deployed on Azure App Service, you can set the idle timeout by modifying the web.config file or using the Azure portal.

    Via the web.config file

    In the web.config file, you can increase the timeout by setting the executionTimeout property of applicationInitialisation and httpRuntime through the <system.webServer> section under the <configuration> tag. Note, however, that executionTimeout is typically used for request execution timeouts for ASP.NET applications, not idle timeouts. For idle timeout, you may need to look at the Azure App Service configuration settings.

    https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-tcp-idle-timeout?tabs=tcp-reset-idle-portal

    Best regards

    NeuviJ

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.