# aiohttp.client_exceptions.ServerTimeoutError: Connection timeout to host https://slow.example.com

- **ID:** `python/aiohttp-connector-timeout`
- **Domain:** python
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The server did not complete the TCP/TLS handshake or respond within the configured aiohttp.ClientTimeout, often because of an overloaded endpoint or a too-aggressive default timeout.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   timeout = aiohttp.ClientTimeout(total=30, connect=5, sock_read=10)
async with aiohttp.ClientSession(timeout=timeout) as s:
    await s.get(url)
   ```
2. **** (85% success)
   ```
   for i in range(3):
    try:
        async with session.get(url) as r:
            return await r.text()
    except aiohttp.ServerTimeoutError:
        await asyncio.sleep(2 ** i)
   ```

## Dead Ends

- **** — Hangs forever on dead hosts and exhausts connection pool slots. (90% fail)
- **** — Handshake still fails on the sock_connect phase before the total timer matters. (75% fail)
