cURL error 28: Operation timed out (Laravel HTTP client) Laravel Origin: Application & API Last updated 4 Nov 2026

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.

Exact message you may see 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
Seen on: Laravel PHP

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

  1. Http::timeout(60)->connectTimeout(10)->retry(3, 200)->get($url)
  2. Test from the server: curl -v URL
  3. Move slow calls to queued jobs

Detailed fix by platform

Linux

  1. curl -v --max-time 30 https://api.example.com/health

How to diagnose

  1. Timeout — Configured value?
  2. Remote — Reachable from server?
  3. 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:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

Attempt to read property "x" on null — Laravel/PHP 8: ErrorException: Attempt to read property "name" on null (Laravel)Attempt to read prope…Command "x" is not defined — Laravel: Symfony\Component\Console\Exception\CommandNotFoundException: Command "make:livewire" is not defined. Did you mean one of these? (Laravel)Command "x" is not de…context deadline exceeded — Go: Get "https://api.example.com": context deadline exceeded (Client.Timeout exceeded while awaiting headers) (Go)context deadline exce…Laravel: Allowed memory size exhausted (request) — Laravel/PHP: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in vendor/laravel/framework (Laravel)Laravel: Allowed memo…Maximum execution time of 30 seconds exceeded — Laravel: Symfony\Component\ErrorHandler\Error\FatalError: Maximum execution time of 30 seconds exceeded (Laravel)Maximum execution tim…Redis connection refused (Laravel) — Laravel: Predis\Connection\ConnectionException: Connection refused [tcp://127.0.0.1:6379] / RedisException: Connection refused (Laravel)Redis connection refu…The process exceeded the timeout of 60 seconds — Laravel: Symfony\Component\Process\Exception\ProcessTimedOutException: The process "npm run build" exceeded the timeout of 60 seconds (Laravel)The process exceeded …cURL erro…

Explore the map of this error Full error map →

🧠 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.