Introduction

Travis CI build cancelled when execution exceeds maximum time limit. This guide provides step-by-step diagnosis and resolution.

Symptoms

Typical error output:

bash
Error: CI/CD pipeline execution failed
Check pipeline logs for details
Verify runner/agent connectivity and configuration

Common Causes

  1. 1.Runner/agent offline or disconnected from server
  2. 2.Configuration YAML has syntax error
  3. 3.Required secret or credential not configured
  4. 4.Resource quota or timeout exceeded

Step-by-Step Fix

Step 1: Check Current State

bash
# Check CI/CD status
curl -s https://ci.example.com/api/status
# View pipeline logs
tail -f /var/log/ci/pipeline.log
# Check runner/agent connectivity
ps aux | grep runner

Step 2: Identify Root Cause

bash
# Check pipeline configuration
cat .ci/pipeline.yaml
# Verify runner connectivity
ping ci-server.example.com
# Check logs
tail -f /var/log/ci/runner.log

Step 3: Apply Primary Fix

```bash # Primary fix: Check and reconfigure # Verify runner registration ci-runner register --token <token> --url https://ci.example.com

# Test pipeline locally ci-cli validate pipeline.yaml

# Restart runner service systemctl restart ci-runner ```

Step 4: Apply Alternative Fix

bash
# Alternative: Debug configuration
cat .ci/pipeline.yaml
# Check logs
grep -i error /var/log/ci/*.log
# Verify secrets
ci-cli secrets list

Step 5: Verify the Fix

bash
curl -s https://ci.example.com/api/pipelines | jq '.status'
# Should show "running" or "success"
ci-cli pipeline status

Common Pitfalls

  • Not testing pipeline changes in branch before merging
  • Using hardcoded secrets instead of secret management
  • Not setting appropriate timeouts for long-running jobs
  • Forgetting to update runner capabilities after adding new tools

Best Practices

  • Use YAML validators before committing pipeline changes
  • Implement proper secret rotation policies
  • Monitor runner/agent health continuously
  • Keep CI/CD tools updated to latest stable versions
  • CI/CD Runner Offline
  • Pipeline YAML Syntax Error
  • Secret Not Found
  • Build Timeout