Share via

App swap slot fails with error code 1. On github deploy

Hugo Blok 20 Reputation points
2026-02-13T12:06:52.74+00:00

There is an issue with the slot swapping timing out after 20 minutes without giving an error
Run az webapp deployment slot swap \

az webapp deployment slot swap \

--resource-group dev \

--name dev-db-app \

--slot stage \

--target-slot production

shell: /usr/bin/bash -e {0}

ERROR: Cannot swap site slots for site 'dev-db-app' because the 'stage' slot did not respond to http ping.

Error: ``Process completed with exit code 1.

This error/bug is seemingly random occuring in about 1 in every 5 deployments, rerunning the same pipeline fixes the issue (after at least 20 minutes of the swap slot being reserved it times out allowing for the redeployment without any issue)

I previously encountered this issue with a team member and have had this issue before, reraising this thread on recommendation by a comment
https://learn.microsoft.com/en-us/answers/questions/5774462/app-services-slot-swap-fails?comment=question&translated=false#newest-question-comment

Azure Automation
Azure Automation

An Azure service that is used to automate, configure, and install updates across hybrid environments.


Answer accepted by question author

Praneeth Maddali 10,110 Reputation points Microsoft External Staff Moderator
2026-02-17T12:56:00.7633333+00:00

Hi @Hugo Blok

Thank you for sharing the error details this helps clarify the root cause.

Yes, we can confirm that the slot swap failures are caused by the Python ImportError, not by the swap operation itself.

During a slot swap, Azure App Service performs an internal warm‑up check that requires the source slot to successfully start and respond to an HTTP request. Because the application sometimes fails to start due to:

Knowledge base

ImportError: cannot import name 'Sentinel' from 'typing_extensions'

the staging slot does not become healthy in time, which results in the “did not respond to http ping” swap failure.

This also explains why the issue occurs intermittently — dependency or cache‑related version conflicts in Python environments can cause this error only on some startups.

Resolving the underlying Python package/version conflict should make the slot swap reliable again. Please click "Accept the answer” and Yes, this can be beneficial to other community members.

If you have any other questions, let me know in the "comments" and I would be happy to help you

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-02-13T12:07:36.53+00:00

    The error you're encountering during the slot swap operation indicates that the stage slot did not respond to the HTTP ping, which is a common issue that can occur for various reasons. Here are some troubleshooting steps and considerations:

    1. Check Slot Configuration: Ensure that the stage slot is properly configured and that all necessary settings (like app settings and connection strings) are correctly applied. If any of these settings are misconfigured, it could lead to the slot not responding.
    2. Warm-Up the Slot: Before performing the swap, ensure that the stage slot is warmed up. You can do this by sending a few HTTP requests to the stage slot to ensure it is ready to handle traffic.
    3. Review Logs: Check the logs for the stage slot to see if there are any errors or issues that could be causing it to be unresponsive. The Kudu logs can be particularly useful for diagnosing problems.
    4. Increase Timeout: If the swap operation is timing out, consider increasing the timeout duration if possible. This may help in scenarios where the application takes longer to warm up.
    5. Retry Mechanism: Since you mentioned that rerunning the pipeline often resolves the issue, implementing a retry mechanism in your deployment pipeline could help mitigate the impact of this intermittent issue.
    6. Monitor Resource Usage: Ensure that your App Service Plan has enough resources (CPU, memory) to handle the swap operation. Insufficient resources can lead to timeouts and unresponsive slots.

    If the problem persists after trying these steps, you may want to consider reaching out to Azure support for further assistance, as they can provide more detailed insights based on your specific environment and configuration.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.