I am using msdeploy combined with TeamCity to deploy multiple websites to a test server.
I will intermittently get an error when backing up the old deployed site. The error output is:
Error Code: ERROR_EXCEEDED_MAX_SITE_CONNECTIONS More Information: The maximum number of connections for this site has been exceeded. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEEDED_MAX_SITE_CONNECTIONS. Error count: 1. Process exited with code -1
Unfortunately, the "learn more at" site does not have any information for the error
The web has many workaround for after the problem occurs. Basically to restart the target server or reset IIS on the target server, etc. It's all about resetting the target to get it to work again.
For my case, I can re-run the deployment and 90% of the time it will work the second time around. However, I don't want to even hit it the first time around. The individuals that use TeamCity to do the deployment don't like the answer "just run it again." They don't want it to fail in the first place. I can understand their desire.
I have tried using the
retryInterval options. But it still fails intermittenly. It almost feels like a lingering socket issue.
The command being used for the backup is as follows:
msdeploy.exe -verb:sync -source:iisApp='Default Web Site/<site-name>',ComputerName='https://<server-name>:8172/MsDeploy.axd?site=Default%20Web%20Site',UserName=,AuthType='NTLM' -dest:package='D:\_WebDeployBackups\<site-name>\<version-build>-backup.zip',ComputerName='https://<server-name>:8172/MsDeploy.axd?site=Default%20Web%20Site',UserName=,AuthType='NTLM' -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -allowUntrusted -retryAttempts=5 -retryInterval:5000
Does anyone have experience with avoiding this issue? Or, can you suggest ways to debug further?
I've confirmed that there is no issue with disk space.