# requests.exceptions.ConnectionError: HTTPConnectionPool(host='proxy.example.com', port=8080): Max retries exceeded with url: http://target.com/ (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(104, 'Connection reset by peer')))

- **ID:** `python/requests-connectionerror-proxy-connection-reset`
- **Domain:** python
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The proxy server abruptly closed the connection, possibly due to timeout or overload.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **Use a different proxy server** (85% success)
   ```
   proxies = {'http': 'http://new-proxy.example.com:8080'}
requests.get('http://target.com', proxies=proxies)
   ```
2. **Add a delay between connection attempts to avoid overwhelming the proxy** (75% success)
   ```
   import time
for _ in range(3):
    try:
        response = requests.get('http://target.com', proxies=proxies)
        break
    except requests.exceptions.ConnectionError:
        time.sleep(2)
   ```

## Dead Ends

- **Retrying immediately with the same proxy** — The proxy may still be overloaded or resetting connections. (80% fail)
- **Increasing the number of retries** — Retries may succeed temporarily but the underlying proxy issue persists. (70% fail)
