**TL;DR:** Symptom: App Service slot swap stuck or 409: previous deployment still running Cause: Kudu runs one deployment at a time; a second push 409s, and a swap-with-preview left open blocks the next swap. Locked files on Windows plans add a third flavor. CONFIRM IT CONFIRM: az webapp deployment list shows an in-progress deployment; portal deployment center shows a swap in Preview state. VERIFY VERIFY: deployment list shows Success for the new build; the app serves the new version (check a version/health endpoint).

## The error

```text
App Service slot swap stuck or 409: previous deployment still running Cause: Kudu runs one deployment at a time; a second push 409s, and a swap-with-preview left open blocks the next swap. Locked files on Windows plans add a third flavor. CONFIRM IT CONFIRM: az webapp deployment list shows an in-pro
```

## The fix

**TL;DR:** Symptom: App Service slot swap stuck or 409: previous deployment still running Cause: Kudu runs one deployment at a time; a second push 409s, and a swap-with-preview left open blocks the next swap. Locked files on Windows plans add a third flavor. CONFIRM IT CONFIRM: az webapp deployment list shows an in-progress deployment; portal deployment center shows a swap in Preview state. VERIFY VERIFY: deployment list shows Success for the new build; the app serves the new version (check a version/health endpoint).

## The fix

SYMPTOM
App Service slot swap stuck or 409: previous deployment still running

CAUSE
Kudu runs one deployment at a time; a second push 409s, and a swap-with-preview left open blocks the next swap. Locked files on Windows plans add a third flavor.

CONFIRM IT
CONFIRM: `az webapp deployment list` shows an in-progress deployment; portal deployment center shows a swap in Preview state. Windows plan + zip deploy failing on DLL locks = file-lock flavor.

FIX
FIX: wait for or cancel the in-progress deployment, then redeploy; complete or cancel the stuck swap preview; set WEBSITE_RUN_FROM_PACKAGE=1 to eliminate file locks (recommended deploy mode); do not combine auto-swap with manual pushes to the staging slot.

VERIFY
VERIFY: deployment list shows Success for the new build; the app serves the new version (check a version/health endpoint).

## When to use this

- This covers exactly what the title says: Diagnose.
- You are setting this up for the first time, or auditing an existing setup.
- You want the key gotchas in one place before you start.

## When not to use this

- You are doing a different workflow with Diagnose; these steps are specific to the title above.
- You need the full reference docs; this is the short path, not the manual.