Troubleshooting
Quick Diagnosis
# Check container status
docker ps | grep circuit-breakers
# Check recent logs
docker logs circuit-breakers --tail 50 2>&1 | grep -i error
# Check fallback buffer (if using file fallback)
ls -la /var/buffer/failed-requests.jsonl 2>/dev/null || echo "No buffer file"
Common Issues
Circuit breaker not triggering
Cause: Threshold not reached or timeout too long
# Check logs for retry attempts
docker logs circuit-breakers --tail 50 2>&1 | grep -i retry
Fix: Lower the failure threshold or reduce timeout:
max_retries: 3
timeout: 5s # Reduce from 30s
All requests going to fallback
Cause: Primary destination down or unreachable
# Test primary destination directly
curl -s -o /dev/null -w "%{http_code}" $PRIMARY_API_URL/health
Fix: Verify destination URL, check network, restart destination service
Fallback buffer filling up
Cause: Primary has been down too long, buffer not being replayed
# Check buffer size
wc -l /var/buffer/failed-requests.jsonl 2>/dev/null
Fix: Fix primary destination, then replay the buffer manually or restart the pipeline
Data loss during failover
Cause: No fallback configured or fallback also failing
Fix: Add multi-level fallback chain:
output:
fallback:
- http_client: {url: "${PRIMARY_URL}"}
- http_client: {url: "${SECONDARY_URL}"}
- file: {path: "/var/buffer/emergency.jsonl"}
Still stuck?
- Add debug logging:
logger: {level: DEBUG} - Check the Complete Pipeline for reference config
- Review Priority Queues for handling degraded service