cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received
A PHP cURL (or Guzzle) request timed out before the remote server answered.
Seen on:
PHP
Meaning
Error 28 is cURL’s timeout. “0 bytes received” usually means the connection was never answered (firewall, wrong host); a partial byte count means the server was too slow.
Common causes
- Remote API slow or down
- Outbound firewall on the host blocking the port
- DNS slow
- Timeout set very low
⚡ Quick fix
- Test reachability from the server with curl on the command line
- Set sensible CURLOPT_CONNECTTIMEOUT and CURLOPT_TIMEOUT
- Retry idempotent calls with backoff
Detailed fix by platform
PHP
- Guzzle:
new Client(['connect_timeout' => 5, 'timeout' => 20])
How to diagnose
- Bytes — 0 bytes (no answer) or partial (slow)?
- Reachability — curl from the same server
🧠 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026