Server Too Busy in vs2012

前端 未结 8 1905
你的背包
你的背包 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: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:

    
      
    
    

    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() + "
    "); Response.Write("AppRequestQueueLimit: " + section.AppRequestQueueLimit.ToString() + "
    ");

提交回复
热议问题