2

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 ERROR_EXCEEDED_MAX_SITE_CONNECTIONS.

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 retryCount and 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.

1

By default, number of simultaneous connections is limited for WMSVC by 3. To increase it - you can modify registry DWORD key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy\3] "MaxSiteConnections"

http://forums.iis.net/t/1203185.aspx?Web+deployment+task+failed+Max+number+of+connections

Additionally, I advise to check, who is consuming your connections by parsing WMSVC logs

1
  • Thank you for the suggestion. This registry key did not exist. I added it, setting it to 0x10, as outlined in the forum link you provided. I am still intermittently seeing the error. Next step is to investigate WMSVC logging.
    – John Rocha
    Sep 19 '17 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.