I have a cloud service in my visual studio which contains a worker role with two instances. I have deployed using my CD in vsts which takes the build from my Cloud-CI pipeline.
My deployment is failing if i keep running my cloud service in my Azure Portal. Error:
BadRequest : Your role instances have recycled a number of times during an update or upgrade operation. This indicates that the new version of your service or the configuration settings you provided when configuring the service prevent the role instances from running. Verify your code does not throw unhandled exceptions and that your configuration settings are correct and then start another update or upgrade operation.
My deployment is success if i keep stopping my cloud service in my Azure Portal.
I am unable to find the main issue why it is failing and will i have to stop the Azure cloud service (classic) every time before the deployment?
We faced the same issue, anyway it's better to stop your service and start it again as there could be configuration changes.
You could add a new release task to stop the site in prior to all other tasks.