Laravel: Illuminate\Http\Client\ConnectionException: cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received
The Laravel Http:: client waited for a response longer than its timeout and gave up.
cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes receivedIlluminate\Http\Client\ConnectionException: cURL error 28cURL error 6: Could not resolve hostcURL error 7: Failed to connect to host port 443cURL error 28: Connection timed out after 10001 milliseconds Meaning
Increase the timeout (Http::timeout(60)), set a connect timeout, retry with backoff (->retry(3, 200)), and check the remote API's health and network egress (firewalls, DNS). For slow endpoints dispatch jobs instead of blocking web requests.
Common causes
- Remote API slow or down
- Default 30s timeout too low
- Outbound firewall/DNS issues
- Large response on slow link
- IPv6 route problem
⚡ Quick fix
Http::timeout(60)->connectTimeout(10)->retry(3, 200)->get($url)- Test from the server:
curl -v URL - Move slow calls to queued jobs
Detailed fix by platform
Linux
curl -v --max-time 30 https://api.example.com/health
How to diagnose
- Timeout — Configured value?
- Remote — Reachable from server?
- Retry — Backoff?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Attempt to read property "x" on null Laravel/PHP 8: ErrorException: Attempt to read property "name" on null
- Command "x" is not defined Laravel: Symfony\Component\Console\Exception\CommandNotFoundException: Command "make:livewire" is not defined. Did you mean one of these?
- context deadline exceeded Go: Get "https://api.example.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Most viewed in Laravel
- MassAssignmentException Laravel: Illuminate\Database\Eloquent\MassAssignmentException: Add [x] to fillable property to allow mass assignment
- The GET method is not supported for route Laravel: The GET method is not supported for route x. Supported methods: POST (MethodNotAllowedHttpException)
- Route [login] not defined Laravel: Symfony\Component\Routing\Exception\RouteNotFoundException: Route [login] not defined
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 4 Nov 2026