Kyle Gobel
Kyle Gobel

Reputation: 5750

MS Web Deploy makes site hang for like 5-10 minutes

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

Upvotes: 1

Views: 162

Answers (1)

Matt Woodward
Matt Woodward

Reputation: 2177

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.

Upvotes: 1

Related Questions