inital connection to TFS very slow - visual-studio-2010

We're running TFS 2010 on a dedicated machine. The SQL db is also running on the same machine so there is no external LAN/WAN access there.
When we check in/out or get anything from TFS - the initial connection and any connections after some inactivity from VS is extremely slow, sometimes up to 1 or 2 minutes. Once it does whatever it has to do, things start run fast and move along with no problems whatsoever.
What/where should i check to find this bottleneck, or whatever it is that's turning off after inactivity ?

I think that it is similar to SQL Server Reporting services. When it is inactive for some time (20 min?) the worker process fall asleep and wake up time is rather long.
SSRS 2008 - Long delay after a period if inactivity, How to Speed up MS SQL Server Reporting Services SSRS on First Run. There should be similar setting for TFS webservices.

I suspect it is the traditional ASP.NET wakeup pipeline that you are running into. If you want to try out setting a scheduled task that runs PingTFS.exe then it will keep the site loaded so that you don't see this initial hit each time the TFS web services have cooled down.
You can find PingTFS.exe available from Neno Loje here: https://msmvps.com/blogs/vstsblog/archive/2011/03/02/how-to-ping-tfs-to-see-if-it-s-up-and-running.aspx
If that doesn't help, then it's likely the hardware in the environment. You definitely don't want to have too few of resources for your TFS environment. Let us know if the first suggestion doesn't work out.

Related

How can I temporarily disable a LocalDB database for connection failure testing?

For developer testing, I run a LocalDB version of my SQLServer database from Visual Studio 2013. I want to test what happens when this database becomes unreachable to my C# application running on the same machine - ideally debugging from VS. Specifically, becomes unreachable while the application is running, so I can "turn it on/of" without re-starting my application and check it handles this OK.
I can't see an obvious "stop DB" option within VS. I also don't know how the LocalDB instance is managed... if it only exists while VS is running for instance?
What way(s) are there to do what I want, with both DB and application running on the same machine and the DB hosted as LocalDB not through SQLServer (which I don't have installed)?
Instead of stopping the database you can just change the configuration to some dummy IP/Host or port in your connection string.
LocalDB isn't ideal for testing of this scenario. Better test on the real thing.
However, if you are just prototyping something, you could:
Start by testing how the application responds if you kill its database connection. The app will get error code 596 (or perhaps 233).
Test how the app responds to sqllocaldb stop <instancename> -k
(it will probably be seeing an error code 904 or 109; it's a poor test as the localdb will be automatically restarted nearly immediately).
Make sure, perhaps by source code inspection, that the application is similarly impervious to error code -2, -1, or 2, which is what you will probably be seeing in regular disconnections or when recovering from those.
While I have listed some error codes I have seen, because the app you are testing (or its library) might be doing something like that, I don't really recommend coding against individual error codes. A disconnection is better detected as an error with severity 20 or more.
Don't forget to do the final testing in conditions similar to your production conditions.

Web access is extremely slow

I have TFS 2015 installed on one of the company's servers. I try to access TFS using web access and it is extremely slow, it takes more than 5 minutes for a page to load and sometimes even longer. If I restart the server, TFS becomes a little bit faster (a page would need only a minute or so to load), but soon it becomes slower.
The server itself is okay. The CPU and memory are not even fully utilized (~20% - ~40% is utilized).
Other applications that are installed on the server are working fine, so it's just TFS.
Any suggestions?
Log in the application tier machine to try to access the web access to see whether you can see the same behavior.
Check the network connection between the application tier machine and data tier machine if you set up TFS in a multiple server configuration. You may try to turn off the firewall and anti-virus software on the machines.
Clean the cache folder on the application tier, usually the folder locates in: C:\TfsData\ApplicationTier\_fileCache
Check the Requirements and compatibility, to see whether your TFS set up on a appropriate environment.
If the items above is not helpful. You may need to consider move your TFS to another hardware.

Visual Studio 2010 Prevent Build log polling

I am running into a problem with viewing the build logs while a build is in progress.
The build is being run on a seperate (continious integration build) machine and we are using VS2010 and Team Foundation Server to manage the build from our development client machines.
The problem is that VS2010 will poll for the logs on the build server and update approx every 30 seconds. The solutions that are being built are pretty big and there are a lot of them. They generate a lot of warnings and logs at the moment which bloat the log considerably. Because of this it is nearly impossible to use VS2010 to view the build log until after the build has completed which is approx 85 minutes.
Obviously - a solution would be to fix up all the warnings, but I was wondering if there is a way to prevent the build log viewer from polling - just list all the detail until a 'refresh' is requested or even a way to extend the poll to say every 5 minutes would work for me.
I understand that the build log no longer gets written out to disk in VS2010 - so I can't access it unless I go through the Build Explorer.
Any thoughts would be very much appreciated!
Jay
It is possible, please have a look at this useful post written by Jason Prickett You will be able to change the polling interval by adding a DWROD 'ReportPollingInterval' at HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\TeamFoundation in the registery. Values to the DWord are assigned in milliseconds, so 30000 would mean 30 seconds.
Also consider installing VS 2010 SP1 on your machine, the SP1 has addressed a lot of performance issues with the build summary page.
Bounce back if you have any follow up questions.

WaIISHost flatlining web-role

First off, I'm very new to Azure.
I've successfully deployed an ASP.NET MVC 3 web application to Azure, using a web role. The app uses Entity Framework and SQL Azure.
Recently I've done some changes (some including adding appsettings), and tried to upgrade the application. When upgrading, it took quite a long time, before Aborting. I've always deployed through the management portal Silverlight application at http://windows.azure.com.
When trying again to no avail, I setup remote desktop and deployed again. The remote desktop session was extremely slow, and it turned out to be because WaIISHost was putting the CPU to 100%.
The IIS Manager shows that the application is deployed and 'started', however I cannot navigate to the site in the VM, and the deployment constantly seems to be trying to update without success and eventually aborting and retrying, (as I write this, it's currently Busy and Waiting for role to start...).
Does anyone have any ideas as to what the problem could be?
I believe all the right dependencies are set to copy local, which is a possible problem. It is extremely hard to debug this issue, as the remote desktop session hangs so often due to the 100% CPU utilization, and the recycling/restarting/reupdating of the web role from time to time.
Thanks,
James
P.S. Hope some of that made at least some sense...
I doubt that there's something doing in your WebRole.OnStart and/or Run, which caused the WaIISHost uses 100% CPU. Can you remove all codes from the WebRole.OnStart and/or Run and try again.
And it might be helpful to turn on the IntelliTrace when deploying, so that you can download the trace and find out any exceptions occurred when your application started, even before the website started.

Team foundation server 2010 - some setup question relating to performance

Setup TFS 2010 on a pretty oldish server (actually an oldish desktop machine running server 2003 - single core, pre Core2 P4 so outdated...)
I'm finding a first adding and first getting of a website with about 700 files is quite slow (over 20 mins already over a VPN line).
Once you do that, the checkin / checkout operations are reasonably ok.
One thing I haven't done yet is get one of the guys at work to make a change and for me at home to do a get latest. We were running VSS up to this and that operation used to be a killer!
Anyway, few questions:
1)We set it up as a basic installation on server 2008 express. Would there be any performance gain with full sql server 2008?
2) We have the option of moving the drive to a better core 2 machine that should be a lot faster - will that make any difference?
Or are we simply running into a typical slowness of TFS over a LAN (bearing in mind we as a team work mainly in the office but sometimes from home over VPN when the speed issue seems to get worse).
TFS in it self isn't slow. We run a TFS on a dedicated VM and with the other VM's on the actual server also taking up ticks, or TFS is decently fast and reliable. Even when checking in and out code, running reports etc... So maybe the 2 core machine would help, but your P4 shouldn't be that bad in running it. 700 Files should be fairly quick within a minute or so. I think its your VPN that makes it slow. Everyone knows how slow VPN's can be.
Just an update. We moved to a faster machine (since we were getting one anyway). The speed of the machine makes no difference.
The good news is, its only slow the first time you add a project to TFS or take it down from TFS.
Daily checkin / checkout is fine. Also, doing a get latest from home is much improved over VSS - it no longer does that horrible freeze while it spends 10 mins figuring out if files have changed.
It was worth the upgrade for this alone.

Resources