# upstream timed out (110: Connection timed out) while reading upstream, client: 10.0.0.1, server: stream.example.com

- **ID:** `nginx/proxy-read-timeout-streaming`
- **Domain:** nginx
- **Category:** timeout_error
- **Error Code:** `110`
- **Verification:** ai_generated
- **Fix Rate:** 90%

## Root Cause

proxy_read_timeout is too short for streaming or long-polling responses, causing nginx to close the connection before the upstream finishes sending data.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| nginx/1.18.0 | active | — | — |
| nginx/1.20.0 | active | — | — |
| nginx/1.24.0 | active | — | — |
| nginx/1.26.0 | active | — | — |

## Workarounds

1. **Increase proxy_read_timeout to 300s (or higher) in the location or server block: `location /stream { proxy_read_timeout 300s; ... }`** (90% success)
   ```
   Increase proxy_read_timeout to 300s (or higher) in the location or server block: `location /stream { proxy_read_timeout 300s; ... }`
   ```
2. **For streaming endpoints, add a send_timeout directive to avoid client-side timeouts: `send_timeout 300s;`** (80% success)
   ```
   For streaming endpoints, add a send_timeout directive to avoid client-side timeouts: `send_timeout 300s;`
   ```
3. **Implement keepalive on upstream to reduce connection overhead: `upstream backend { server 127.0.0.1:8080; keepalive 32; }` and `proxy_http_version 1.1; proxy_set_header Connection '';`** (75% success)
   ```
   Implement keepalive on upstream to reduce connection overhead: `upstream backend { server 127.0.0.1:8080; keepalive 32; }` and `proxy_http_version 1.1; proxy_set_header Connection '';`
   ```

## Dead Ends

- **** — proxy_connect_timeout controls the initial handshake, not the data transfer phase; the timeout occurs during reading, not connecting. (80% fail)
- **** — Keepalive affects connection reuse, not the per-request timeout for reading response data. (40% fail)
- **** — Infinite timeout can accumulate zombie connections, eventually exhausting worker connections or memory. (60% fail)
