1

I've got an ASP.net MVC5 site setup using teamcity and webdeploy for continuous delivery.

What's strange and what I don't understand, is how the webdeploy makes the website 'hang', for near 10 minutes.

The publish task completes in less than like 30 seconds, and is completely stopped and finished. But if you hit the website, it just 'waits', displaying nothing, doing nothing for about 5 to 10 minutes.

Can anyone give me some hints as to what is going on behind the scenes? If it really publishes in like 30 seconds...what's with the long wait for the website to be usable again?

Edit

Here are the command line arguments i'm using in teamcity with MSBuild (added the newlines for readability)

%env.Configuration% in the case i"m conserned about is Release and %env.TargetServer% is my server Ip Address

/P:Configuration=%env.Configuration% 
/P:DeployOnBuild=True     
/P:DeployTarget=MSDeployPublish 
/P:MsDeployServiceUrl=https://%env.TargetServer%/MsDeploy.axd   
/P:AllowUntrustedCertificate=True  
/P:MSDeployPublishMethod=WMSvc 
/P:CreatePackageOnPublish=True 
/P:Username=myDomain\myUser 
/P:Password=myPassword
Kyle Gobel
  • 5,530
  • 9
  • 45
  • 68
  • Could you provide your msdeploy / msbuild command with parameters? Sounds strange! – Matt Woodward Feb 06 '14 at 22:43
  • thanks for responding, i edited the post – Kyle Gobel Feb 07 '14 at 20:01
  • How can you be sure it is web deploy causing the hang? – Mike Cheel Feb 07 '14 at 20:05
  • I don't know..it could be something else I guess, but I have no clue what. I mean it works fine...web deploy start -> web deploy finish -> website unusable for 6-10 min. I'm not really sure where else to look – Kyle Gobel Feb 07 '14 at 20:31
  • @LasseChristiansen-sw_lasse No I haven't. I think though the server might be strapped on resources, because during this time period when the site is not working if I look at the performance tab in the task manager the CPU Utilization is capped at 100%. Eventually it drops back to ~ 20% and everything works fine again. I'm thinking this is just because it's an EC2 small instance and maybe compiling the site is hard for it...that's really only a hunch though. I haven't devoted more time to looking further into this yet. – Kyle Gobel Apr 24 '14 at 15:04
  • @Kyle - okay, thanks for getting back to me on this. I'm having a similar issue with a WCF service hosted in IIS 8 - I will get back to you if I find a solution. – Lasse Christiansen Apr 25 '14 at 07:17

1 Answers1

1

This could be IIS rebuilding the application following the files being changed (i.e. Dynamic Compilation) although 5 - 10 mins seems pretty excessive. Would be hard to gauge without having full visibility I think.

Would be worth running some diagnostics on the IIS Server when you've made the first request (after the deployment) to understand what's going on. I'd typically use something like Sysinternals Process Monitor for this. You should be able to see what going on at a file system level and be able to understand what's taking the time when serving that first request.

Not sure that there will be a simple answer for this one, more of a dig for further information by running diagnostics and establishing some tangible performance information.

Matt Woodward
  • 1,941
  • 20
  • 24