Issue with Deployment Slot in Testing Server

Darshan Sreedhar 0 Reputation points
2024-07-22T04:18:53.6333333+00:00

Logs

Once I deploy the Code to the testing server in azure app service, I swap to the production slot. After sometime the code in the testing slot will point to an old date. So I have to re-run all the jobs in the GitHub so the code is redeployed again to the testing server. Not sure what is causing this to happen. This has started since a couple of months. The Swap is completed successfully as it shows in the Check Swap Operations under Diagnostic Tools.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,932 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,041 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,968 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 33,866 Reputation points Volunteer Moderator
    2025-01-18T18:41:40.38+00:00

    Possible causes to your problem :

    • Some application settings might be configured as "slot-specific." If these settings include configurations pointing to older builds or deployment artifacts, they may cause inconsistencies when slots are swapped.
    • During the slot swap, if the testing slot does not retain the updated deployment after the swap, it could be due to a configuration issue or a rollback mechanism reverting to the older deployment.

    - If there are multiple pipelines deploying code or if old pipelines are still active, they might overwrite the deployment in the testing slot after the swap.

    - The swap operation might not fully complete due to caching or lock conflicts. Although it shows as successful, there might be underlying issues with the swap operation.

    -App Service might still hold onto older deployment artifacts due to filesystem caching or incomplete cleanup during redeployments.

    -A GitHub Actions job or another CI/CD process might inadvertently redeploy an older version after the swap operation completes.

    To help you troubleshoot your issue :

    Go to Configuration in the Azure Portal for your App Service to check for any slot-specific settings (marked with a check in the "Slot Setting" column).

    You can use the Kudu Console (accessible via https://<app_name>.scm.azurewebsites.net/) to verify the content in the wwwroot directory and then clear it.

    In your GitHub workflows, review the logs to see if old jobs are being triggered and redeploying to the testing slot.

    If the issue remains unresolved, contact Azure Support with detailed logs from your CI/CD pipelines, deployment logs, and swap diagnostics.

    0 comments No comments

Your answer

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