Server Too Busy in vs2012

前端 未结 8 1812
你的背包
你的背包 2021-01-31 14:16

I\'ve got vs2010 and vs2012 installed side by side. If I open up our MVC site in vs2010 and run it using the development web server it works fine, if I do the same thing in vs2

相关标签:
8条回答
  • 2021-01-31 15:06

    I have had this problem for my ASP.Net solution as well. There were no solutions for this problem on Stack Overflow or anywhere else.

    Setup:

    Visual Studio 2013 (but I think it will also work for vs 2010/2012 ASP.Net web application IIS express setup).

    Our production environment never had this problem because it was running on IIS.

    I have tried a lot to fix it, but I found one specific solution. I set the delayNotificationTimeout to 20 seconds, instead of the default of 5, which was not enough for our solutions to conjure up everything it needed to successfully run.

    <system.web>
        <httpRuntime maxRequestLength="104850" 
                     executionTimeout="600" 
                     enableVersionHeader="false" 
                     delayNotificationTimeout="20" />
    </system.web>
    
    0 讨论(0)
  • 2021-01-31 15:10

    I finally fixed the annoying "Server Too Busy" message from slowing my ASP.Net development.

    According to the remarks on the httpRuntime.appRequestQueueLimit property:

    When the number of requests queued exceeds the limit imposed by this setting, incoming requests will be rejected with a "503 - Server Too Busy" error.

    The default value is 5000, which I randomly increased to 9000 which worked for me:

    <system.web>
      <httpRuntime appRequestQueueLimit="9000"/>
    </system.web>
    

    If you'd like to check this setting at runtime (as well as DelayNotificationTimeout), I added the following code to my Default.aspx.cs Page_Load event based on this Stack Overflow question:

    // Uncomment to debug "Server Too Busy" error message
    Configuration config = WebConfigurationManager.OpenWebConfiguration("~");
    object o = config.GetSection("system.web/httpRuntime");
    HttpRuntimeSection section = o as HttpRuntimeSection;
    Response.Write("DelayNotificationTimeout: " + section.DelayNotificationTimeout.ToString() + "<br>");
    Response.Write("AppRequestQueueLimit: " + section.AppRequestQueueLimit.ToString() + "<br>");
    
    0 讨论(0)
提交回复
热议问题