# Error: Failed to upload artifact. Request timed out after 120000ms while uploading artifact 'dist'

- **ID:** `cicd/github-actions-artifact-upload-timeout`
- **Domain:** cicd
- **Category:** network_error
- **Error Code:** `UPLOAD_TIMEOUT`
- **Verification:** ai_generated
- **Fix Rate:** 78%

## Root Cause

Artifact upload to GitHub Actions storage times out due to large file size, slow network connectivity, or server-side throttling during peak hours.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| actions/upload-artifact@v3 | active | — | — |
| actions/upload-artifact@v4 | active | — | — |
| GitHub Actions hosted runner | active | — | — |

## Workarounds

1. **Split artifact into smaller chunks using multiple upload steps: `tar -czf dist-part1.tar.gz dist/ && actions/upload-artifact@v4 with name: dist-part1` and repeat** (85% success)
   ```
   Split artifact into smaller chunks using multiple upload steps: `tar -czf dist-part1.tar.gz dist/ && actions/upload-artifact@v4 with name: dist-part1` and repeat
   ```
2. **Reduce artifact size by excluding unnecessary files: `actions/upload-artifact@v4 with path: dist/ --exclude '*.map'` and add .gitignore patterns** (80% success)
   ```
   Reduce artifact size by excluding unnecessary files: `actions/upload-artifact@v4 with path: dist/ --exclude '*.map'` and add .gitignore patterns
   ```
3. **Use self-hosted runner with faster network or upload via custom script using GitHub API with chunked upload** (90% success)
   ```
   Use self-hosted runner with faster network or upload via custom script using GitHub API with chunked upload
   ```

## Dead Ends

- **** — Transient network issues may resolve, but if file size or throttling is the cause, retries fail repeatedly. (55% fail)
- **** — actions/upload-artifact does not support custom timeout; timeout is hardcoded on GitHub's side. (95% fail)
- **** — Upload step already compresses; manual compression adds overhead and may not reduce size enough. (40% fail)
