Cloud Service Extended support - Web Roles Instances access not available on average 53 minutes after deployment

Bhatti, Fawad 21 Reputation points
2022-08-22T22:43:56.317+00:00

Hi, I have recently migrated my application from cloud service classic to Cloud Service Extended support. All went fine but, I'm having issues with Web Roles timeout for longer time after the deployment (could package) via Azure Pipeline using ARM template task. ARM template deployment task takes around 2 to 3 minutes to complete with green tick and status is showing role instances are started on the Azure portal. Also, I'm able to RDP to the web roles until it fully enabled web roles.

I can confirm that this issue only happens after the deployment via the Azure Devops pipeline. I would also like to add that if I create a cloud service extended support directly from the Azure portal by uploading the same package, configuration and definition files works like a charm with no issue. It is only happening after completion of the Azure Devops pipeline task (AzureResourceManagerTemplateDeployment).

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
705 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 27,446 Reputation points
    2024-11-19T23:11:33.1866667+00:00

    The issue you're experiencing with Cloud Service Extended Support (CSES) Web Role instances taking an extended time to become accessible after deployment through Azure DevOps is likely related to how the deployment process is being handled by the Azure Resource Manager (ARM) template deployment task.

    Potential Causes and Solutions

    1. ARM Template Deployment Timing
      • When deploying via ARM templates, the deployment task might report success as soon as the resources are provisioned, but the initialization of the Web Roles could still be ongoing.
      • Solution: Add a delay or use health checks in your deployment pipeline to ensure the Web Roles are fully initialized before proceeding with other tasks or validations.
    2. Startup Tasks or Initialization Delays
      • Your Web Role instances may have startup tasks or initialization scripts that take time to complete, causing the delay in accessibility.
      • Solution: Review the startup tasks or initialization scripts for potential optimizations. Alternatively, add logging to the startup process to identify bottlenecks.
    3. ARM Template Configuration Differences
      • There might be subtle differences in how the ARM template configures the Cloud Service Extended Support deployment compared to a manual portal deployment.
      • Solution: Compare the portal deployment's configuration with the ARM template to ensure there are no discrepancies. Look at parameters like instance size, startup scripts, or dependencies.
    4. Load Balancer or Networking Configuration
      • Load balancer or network security settings might delay the readiness of the Web Roles after deployment.
      • Solution: Ensure the networking configurations (e.g., Azure Load Balancer or Application Gateway) and NSG rules are correctly set up in the ARM template to avoid delays in traffic routing.
    5. Azure DevOps Agent or Pipeline Specifics
      • The Azure DevOps pipeline might not be waiting for full readiness before marking the deployment task as successful.
      • Solution:
        • Add a custom PowerShell or CLI script in the pipeline to wait for the Web Roles to be fully accessible before proceeding.
        • Use a script that periodically checks the status of the Web Roles by querying the Azure Management API or monitoring HTTP responses.
    6. Deployment Slots for Zero Downtime
      • If downtime is an issue, consider using deployment slots for a smoother transition.
      • Solution: Set up a staging slot for your Cloud Service Extended Support deployment. After verifying readiness in the staging slot, swap it with the production slot.
    7. Resource Allocation or Throttling
      • Resource contention or throttling in the Azure region could lead to slower initialization during pipeline deployments.
      • Solution: Test deployments in a different region to rule out resource allocation issues.
    8. Diagnostic Logs
      • Enable and review diagnostic logs to identify issues during the Web Role initialization process.
      • Solution: Use Azure Monitor or Application Insights to collect and analyze logs related to the Web Role startup sequence.
    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.