# SocketException: OS Error: Connection timed out, errno = 110

- **ID:** `flutter/network-error-http-request-timeout`
- **Domain:** flutter
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 87%

## Root Cause

An HTTP request made by the app timed out because the server did not respond within the specified timeout duration, often due to network latency, server overload, or incorrect URL.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| flutter 3.10 | active | — | — |
| flutter 3.22 | active | — | — |
| dart 3.0 | active | — | — |
| http 1.1.0 | active | — | — |
| dio 5.4.0 | active | — | — |

## Workarounds

1. **Implement a retry mechanism with exponential backoff using a package like 'retry' or custom logic. Also, check the URL and server status.** (85% success)
   ```
   Implement a retry mechanism with exponential backoff using a package like 'retry' or custom logic. Also, check the URL and server status.
   ```
2. **Set a reasonable timeout on the HTTP client (e.g., 10-15 seconds) and handle the timeout gracefully by showing a user-friendly error message with an option to retry.** (90% success)
   ```
   Set a reasonable timeout on the HTTP client (e.g., 10-15 seconds) and handle the timeout gracefully by showing a user-friendly error message with an option to retry.
   ```

## Dead Ends

- **Increasing the timeout to an extremely high value (e.g., 5 minutes) without addressing the server issue** — Maskes the problem; users experience long waits and the app may still fail if the server is down. (70% fail)
- **Retrying the same request indefinitely without exponential backoff** — Continuously hitting the server can worsen the overload and drain battery/data. (80% fail)
