49

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 vs2012 I get "Server Too Busy" every single time for the first request to the site. Every request after the first request works fine.

Update: I've noticed in vs2012 it only happens of the project needs to build. If I haven't made any changes, ie the project doesn't need to build and I hit F5 to start it up and open up IE it works fine and I don't get the "Server Too Busy" message in the browser.

ctrlalt313373
  • 3,935
  • 7
  • 36
  • 40
  • 3
    I haven't figured this out yet, but it might be related to vs2010 and vs2012 both being installed. I read one reference to someone uninstalling both and then reinstalling both and the message going away. It has not been annoying enough for me yet to do that though. – ctrlalt313373 Apr 22 '13 at 13:33
  • Make sure to check EventVwr - often the real cause of the error is logged there. – FarmerBob Sep 08 '13 at 08:58
  • Uninstalled VS2010 as I don't use it anymore, but I still get the same issue. Not annoying enough yet to reinstall vs2012 – ctrlalt313373 Nov 08 '13 at 21:24
  • In the server explorer in VS2012, are you able to connect to the database? Instead of re-installing VS2012, did you try repairing it? – Termato Dec 30 '13 at 21:22

8 Answers8

48

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>
KyleMit
  • 30,350
  • 66
  • 462
  • 664
Noldy
  • 591
  • 5
  • 10
  • So far so good. If I don't get it in a few more days I will be marking this as the answer. Thanks. – ctrlalt313373 Jul 08 '14 at 16:11
  • This did save some serious headache here...I was headed to machine.config to begin with, but this confirmation was helpful. We also seemed to find a connection to our company's antivirus policy, oddly enough...and traced this down, too :: http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.delaynotificationtimeout(v=vs.110).aspx – beauXjames Nov 05 '14 at 20:02
  • 2
    Can I use **`delayNotificationTimeout="20"`** in ***Production environment*** without _performance issues_ ? *IIS 7.5 Windows Server 2008 R2* – Kiquenet Nov 11 '15 at 13:52
  • @Kiquenet: In my opinion you should avoid using this in a production environment. I used this for a local fix because my solution was dependant on some slow resources. We never experienced this problem on production. – Noldy May 24 '16 at 12:00
3

just clean the solution before you build it. Also, check the size of the folder in which the solution is, before & after clean build; you will surely find some difference. Doing this ensures that you clean/remove unnecessary dlls created after every build which is the cause of delaying the normal flow.

Sunil Padhi
  • 371
  • 1
  • 8
  • 19
2

If you need to increase the request limit for IIS Express try this:

Configure Maximum Number of Requests in IIS Express

Community
  • 1
  • 1
user1616625
  • 1,072
  • 1
  • 9
  • 15
2

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>");
Community
  • 1
  • 1
DeveloperDan
  • 4,626
  • 9
  • 40
  • 65
  • 1
    Isn't this the same as Arnold Van Der Drift's answer, just via code? – ctrlalt313373 Jun 27 '14 at 15:38
  • 1
    This solution didn't work for me. We had no problems with the appRequestQueueLimit but with the amount of time it took for the application to load before it gave a timeout. The Server too busy message can be caused by multiple reasons. – Noldy Jul 15 '14 at 08:37
  • 1
    Too valid for ***Production environment*** without _performance issues_ ? *IIS 7.5 Windows Server 2008 R2* – Kiquenet Nov 11 '15 at 13:56
1

** Config.XML is the first place to begin research ** on new Windows Visual Studio 2012 install. The values should be manually reviewed on each new client/server application

When truly inappropriate server errors make no sense at all, think about your test computer's config XML files that set queue or pool sizes explicitly in the project root, as described in the above MS link. It's highly odd that a server would respond "Too Busy" when it's just you on the machine.

Always good to be able to reuse as many recyclable objects as possible, in particular, database connections.

As far as running both VS 2010 and 2012 on the same development machine it should be ok. Just check there your references are pointing for application dlls.

Chris
  • 11
  • 1
0

You have to raise the concurrent request limit. Read the following :

Modifying the ASP.NET Request Queue Limit http://technet.microsoft.com/en-us/library/dd425294%28office.13%29.aspx

Stathis Andronikos
  • 1,259
  • 2
  • 25
  • 44
0

In your Project --> Right Click Properties then select Web option in your left side in the Servers section check Use Local IIS Web Server

0

If you are running debug in Visual studio with a particular port number, try changing port number. Probably something went wrong with your port on web visual studio project web propertiesserver.

Manoj Attal
  • 2,806
  • 3
  • 28
  • 31