Visual Studio running like a dog

Soldato
Joined
18 Oct 2002
Posts
16,056
Location
The land of milk & beans
Grrrrrr this has been ****ing me off all day.

I'm developling a site in .Net and running it locally. It's been fine for the last month or so but for some reason today when the site loads, or i click a link it takes about 15-20 seconds to do anything. Even setting a break point takes about 20 seconds before it's hit, you step through at normal speed, hit F5 to continue and it takes an age before the site loads up again.

I'm using VS2010 and Firefox. I have disabled ipv6 domains in about:config already so i know it's not that.

Has anyone had this before?

*edit*
Just tried another project and it is doing the same thing so it looks like it's the server .Net uses.

Also tried several restarts and using Chrome with no joy.
 
Last edited:
Sorry yes - our staging server is fine.

I think it could be our SQL server causing the problem. I'm restarting it now.

Hopefully it'll be a case of 'stuggle with the problem for 3 hours, post online, the fix it 5 minutes later'.
 
No, I meant on your machine, within the IDE - in the Web project options select category Web then select the "Use Local IIS Web Server" option.

Does it run dog slow there?
 
Ahh I understand where you mean now - I didnt try that.

However the source of the problem was our SQL server. For some reason it just wasnt playing ball despite being under relatively little load.

Suddenly remembered this happening ~6 months ago. Restarted that and it's now back to its usual self.

Cheers for the help DJ Jestar.
 
I get something similar when SQL has used most of the memory in the machine, have you tried limiting the amount of memory it's allowed? It only releases memory back to the OS when it's restarted or the OS signals it's low on memory, so every thing else suffers - so as yours got fixed when you restarted it maybe that was happening.
 
IIS also does like to sleep when not busy, and sometimes first hits to it can take there sweet time.

As Pho said tho SQL Server will consume all the memory it can if you set no upper limit. It will basically cache as much as it can and so as you read the various tables etc they stay in memory, and are only aged out when needed. SQL will not yield its memory back, and keeps hold of what it has (unless the OS forces it to give it back)

SQL really likes to have its own box as its a resource grabber, so its best to set its limits if you share server space with other things like IIS.

Here is a typical script to cap it: SQL2005 onwards compatible query.

EXEC sys.sp_configure N'show advanced options', N'1' RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'max server memory (MB)', N'1024'
GO
RECONFIGURE WITH OVERRIDE
GO
EXEC sys.sp_configure N'show advanced options', N'0' RECONFIGURE WITH OVERRIDE
GO
 
in your hosts file change:

#127.0.0.1 localhost
to
127.0.0.1 localhost

Also, disable virus scanning of your projects folder.

+ Check SQL profiler as others have said.
 
Back
Top Bottom