MSDN Community

Pipeline Stalls & Timeouts

Common reasons pipelines stall:

  • Resource limits (CPU, memory)
  • Blocked agents
  • Missing variables

Solution steps:

# Example: Increase agent capacity
jobs:
  pool:
    vmImage: 'ubuntu-latest'
  resources:
    limits:
      cpu: 2
      memory: 4GB

Authentication Failures

Check the following:

  1. Service connection permissions
  2. Token expiration
  3. Scope of the PAT

Refresh a PAT:

# Steps to regenerate a PAT
1. Go to Azure DevOps › User Settings › Personal Access Tokens
2. Click "New Token"
3. Select required scopes (e.g., Build, Release)
4. Set expiration and save

Variable Misconfigurations

Ensure variables are defined in the correct scope:

# Defining a secret variable at pipeline level
variables:
- name: MySecret
  value: $(mySecretValue)
  isSecret: true

Use the variable in a script:

# Bash example
echo "Using secret: $MYSECRET"

Deployment Rollback Strategies

Implement a blue/green deployment:

# YAML snippet for blue/green
stages:
- stage: DeployBlue
  jobs: [...]
- stage: DeployGreen
  condition: succeeded()
  jobs: [...]

Or use feature flags to toggle releases safely.