Azure App Service "Conflict ... operation in progress" on slot deploy in CI
App Service serializes deployments and slot operations on a site. If a prior deploy or swap has not finished, a new one returns 409 Conflict because another operation is in progress.
What this error means
The deploy or az webapp deployment slot swap fails with "Conflict (CODE: 409)" and a message that another operation is in progress on the site or slot.
Azure
Conflict (CODE: 409)
Cannot modify this site because another operation is in progress.
(Code: Conflict)Common causes
Overlapping deploys to the same site
Two pipeline runs (or a retried job) target the same web app at once, so the second collides with the first still-running operation.
A slot swap is still settling
A deploy fired immediately after a slot swap hits the site while the swap is finishing, returning 409.
How to fix it
Serialize deploys with concurrency control
- Add a concurrency group so only one deploy to the app runs at a time.
- Let in-flight runs finish before the next starts.
- Re-run the deploy.
.github/workflows/ci.yml
concurrency:
group: deploy-my-app
cancel-in-progress: falseWait for the prior operation, then retry
If the conflict is transient, poll the site state until it is ready, then redeploy.
Terminal
az webapp show --name my-app --resource-group rg --query state -o tsvHow to prevent it
- Use a concurrency group keyed on the app so deploys never overlap.
- Insert a brief settle/poll after a slot swap before deploying again.
- Avoid retrying a deploy while the first attempt may still be running.
Related guides
Azure App Service "Oryx build failed / ZipDeploy failed" in CIFix Azure App Service "Oryx build failed" / "Deployment failed" during ZipDeploy in CI - the Kudu/Oryx build…
Azure App Service "No credentials found ... AZURE_WEBAPP_PUBLISH_PROFILE" in CIFix Azure webapp-deploy "No credentials found. Add an Azure login action or provide publish-profile" in CI -…
Azure Container Apps "az containerapp up ... image pull failed" in CIFix Azure Container Apps "az containerapp up" image-pull failures in CI - the revision cannot pull the image…