Errors & CAPTCHAs

Scraping timeouts: ReadTimeout, Timeout 30000ms exceeded, fixes

HTTP status codes · Timeout
Published

What you see

  • requests.exceptions.ReadTimeout
  • requests.exceptions.ConnectTimeout
  • Read timed out. (read timeout=
  • Max retries exceeded with url
More error strings (24)
  • Caused by ConnectTimeoutError(
  • timed out. (connect timeout=
  • httpx.ReadTimeout
  • httpx.ConnectTimeout
  • httpx.PoolTimeout
  • page.goto: Timeout 30000ms exceeded.
  • playwright._impl._errors.TimeoutError: Timeout 30000ms exceeded.
  • playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded.
  • TimeoutError: Navigation timeout of 30000 ms exceeded
  • net::ERR_TIMED_OUT
  • net::ERR_CONNECTION_TIMED_OUT
  • curl: (28) Operation timed out after
  • curl: (28) Connection timed out after
  • curl: (28) Resolving timed out after
  • CURLE_OPERATION_TIMEDOUT
  • timeout of 30000ms exceeded
  • UND_ERR_CONNECT_TIMEOUT
  • Connect Timeout Error
  • UND_ERR_HEADERS_TIMEOUT
  • scrapy.exceptions.DownloadTimeoutError
  • took longer than 180.0 seconds.
  • User timeout caused connection failure
  • Peer did not connect to destination due timeout
  • Proxy-Status: error=connection_timeout

What it means

Your scraper waited for an answer, gave up, and threw a timeout. No one refused you: the clock just ran out. Which clock matters. A connect timeout means the site (or proxy) never picked up. A read timeout means it picked up, then went quiet. A browser timeout like page.goto: Timeout 30000ms exceeded means the page didn’t finish loading within 30 seconds.

Why it happens

Think of a phone call. A connect timeout: nobody picks up. A read timeout: someone picks up, then goes quiet for too long.

The usual causes, most common first:

  1. The browser waits for a “loaded” signal that never arrives. Playwright and Puppeteer wait for the load event by default. Trackers, ads and pixels can keep a page busy long after you can see it.
  2. The site, or even your proxy’s exit, can be slow. Bright Data’s docs say a target that doesn’t answer in time “could indicate the server is down, overloaded, or blocking connections”.
  3. A silent block. Some sites drop or stall connections from scrapers rather than sending 403. You see a timeout, not a refusal.
  4. Your limit is shorter than the hops in the middle. Scraper APIs and proxies wait for the site themselves, often 60 seconds or more. If you hang up first, you get a timeout. See 502 and 504 for each API’s own limits.
  5. Too many requests all at once. httpx raises PoolTimeout when every connection in its pool (100 by default) is busy and none frees up in time.
  6. The address has several IPs. requests applies its connect timeout per IP. If a dead server has both IPv4 and IPv6 addresses, you can wait twice as long.

The opposite trap is no timeout at all. requests and axios never time out unless you set one, so a stuck request just hangs.

Rotating residential proxies (IPs borrowed from people’s home internet) add their own delay. Every new IP comes from a different home connection, and some of those are slow. Bright Data pitches its ISP proxies as “datacenter speed with residential-registered IPs”.

When a proxy is the one that timed out, it normally tells you:

  • Oxylabs residential proxies answer 504 Timeout with “Request timed out. Please try again.” Errors from Oxylabs’ own network carry an X-Error-Description header.
  • Oxylabs’ dedicated ISP proxies send 504 when the site doesn’t answer: “It usually takes about 60s.”
  • Bright Data sends 408 carrying peer_30040 (“Peer did not connect to destination due timeout”) or 502 with Destination host connect timeout.

Fix it

  1. Read which wait ran out. ConnectTimeout, Connection timed out or ERR_CONNECTION_TIMED_OUT: you never got in. ReadTimeout or Operation timed out after … with 0 bytes received: you got in, the answer never came. Those strings for each tool are in Dev details.
  2. Set a timeout on every request. In requests, the docs’ own example is timeout=(3.05, 27): 3.05 seconds to connect, 27 seconds of silence while reading.
  3. Test the URL by itself. Open it in a normal browser, then run curl -v --connect-timeout 10 --max-time 60 <url>. Slow there too? The site is the problem, not your code.
  4. In a browser, stop waiting for everything. Use waitUntil: 'domcontentloaded', then look for the element you actually need. Playwright marks networkidle as “DISCOURAGED”.
  5. Through a proxy, read its error header first. Bright Data: x-brd-err-code. Oxylabs: X-Error-Description. A timeout on the proxy’s side usually clears on a new IP or session.
  6. Retry these failures, a few times, with growing waits. requests says a ConnectTimeout is “safe to retry”. Scrapy already retries timeouts twice by default. After a read timeout, a scraper API may still finish the job and bill it, so check 502 and 504 before you resend.
  7. Raise the limit only where it is honest. A slow page or a scraper API needs more time. But a dead host doesn’t, so a 5-minute wait there only slows your whole crawl.
  8. Lower your concurrency if you see PoolTimeout or timeouts that start only under load. Then raise the pool size (httpx.Limits(max_connections=…)) when you really need more.

Your timeout must be longer than the proxy’s or the API’s. Bright Data logs your premature hang-up as 499 client_10140 and tells you to make sure “the client waits long enough for the proxy response”.

Did you get a 502 or 504 status rather than a timeout? See 502 and 504. Proxy refused to connect at all? See Python requests ProxyError or ERR_TUNNEL_CONNECTION_FAILED.

What’s the point of splitting connect from read? The two failures mean different things when planning a retry.

A connect timeout means your request never reached the server. That is why the requests source calls ConnectTimeout safe to retry. A read timeout means the request went out and the server “did not send any data in the allotted amount of time”. The server may still be busy with it.

So the numbers you pick follow from that:

  • Connect: short. A live server picks up fast. The requests docs suggest just over a multiple of 3 seconds, since that is the default wait before TCP (the layer that carries your request) sends a lost packet again.
  • Read: as long as the slowest honest hop. A scraper API or a slow page needs more. A dead host does not need more.

For anything that changes data (a POST, a form), our advice is not to retry a read timeout blindly. Check first whether it went through.

ISP proxies: price for 10 IPs a month, cheapest first
Vendor, plan it picksTotal a month$/IP/moTotal a yearFree trial · note · source
Plain Proxies ISP ProxiesShared 250 GB: 10 IP$3.83$0.38$45.93plainproxies.com · 29 Nov 2026
Webshare ISP Proxies20 IP$6.00$0.60$72webshare.io · 29 Nov 2026
Evomi ISP ProxiesShared IPs$10$1.00$120evomi.com · 29 Nov 2026
Toolip ISP ProxiesGlobal ISP: 10 IP$13.99$1.40$167.88toolip.io · 29 Nov 2026

List prices from each vendor’s pricing page, US dollars before tax, live from our price data. Your own size, in the price calculator: ISP proxies.

Paste this into your AI

My scraper fails with this timeout:
"<paste the full error, including everything after 'Caused by'>"
Tell me in plain words which wait ran out: connecting, waiting for the first byte,
the browser's page load, or a proxy or scraper API in the middle.
Then list the likely causes in order, most likely first.
For each cause, give one quick test and one fix.
Show a curl -v command with --connect-timeout and --max-time that tests the same URL.
My setup: <language + library or browser tool>, <the URL pattern>,
<direct, proxy (provider, residential or datacenter, rotating or sticky) or scraper API>,
my timeout settings: <values>, waitUntil: <load / domcontentloaded / networkidle>,
requests in parallel: <number>.
Does the URL open in a normal browser on the same network? <yes/no>

Dev details

Default timeouts, tool by tool

tool default note
requests none waits forever unless you pass timeout
httpx 5 s per phase: connect, read, write, pool
aiohttp 300 s total connect to socket: 30 s
axios none (timeout: 0)
Node.js fetch (undici) connect 10 s headers 300 s, body 300 s
curl connect 300 s whole transfer: never
Scrapy 180 s (DOWNLOAD_TIMEOUT) timeouts retried, RETRY_TIMES = 2
Puppeteer page.goto 30000 ms waitUntil: 'load'
Playwright page.goto (Python) 30 s wait_until="load"
W3C WebDriver page load 300,000 ms script timeout 30,000 ms

Playwright’s Node.js docs now list no timeout by default for page.goto, unless your config’s navigationTimeout or setDefaultNavigationTimeout() sets one. The message always shows which limit fired.

What each library prints

Python requests (from the urllib3 and requests code):

requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='example.com', port=443): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<…>, 'Connection to example.com timed out. (connect timeout=10)'))
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='example.com', port=443): Read timed out. (read timeout=10)

Max retries exceeded doesn’t mean requests tried again: its adapter’s default is 0 retries. It wraps the failure, so read what comes after Caused by.

httpx: httpx.ConnectTimeout, httpx.ReadTimeout, httpx.WriteTimeout, httpx.PoolTimeout. Catch all four using httpx.TimeoutException.

Browser errors:

page.goto: Timeout 30000ms exceeded.
=========================== logs ===========================
navigating to "https://www.nike.com/", waiting until "load"
============================================================

TimeoutError: Navigation timeout of 30000 ms exceeded      (Puppeteer)
net::ERR_TIMED_OUT                                         (Chromium -7: an operation timed out)
net::ERR_CONNECTION_TIMED_OUT                              (Chromium -118: a connection attempt timed out)

The logs block tells you what Playwright was still waiting for. In that log, the page kept loading tracking frames until the timer ran out.

curl (exit code 28, CURLE_OPERATION_TIMEDOUT):

curl: (28) Resolving timed out after <ms> milliseconds
curl: (28) Connection timed out after <ms> milliseconds
curl: (28) Operation timed out after <ms> milliseconds with 0 bytes received

Resolving = DNS never answered. Connection = no handshake. Operation … with 0 bytes received = connected, then nothing.

In Node.js:

timeout of 30000ms exceeded                  (axios, code ECONNABORTED, or ETIMEDOUT with transitional.clarifyTimeoutError)
Connect Timeout Error                        (undici / fetch, code UND_ERR_CONNECT_TIMEOUT)
Headers Timeout Error                        (undici / fetch, code UND_ERR_HEADERS_TIMEOUT)

Scrapy 2.20 raises scrapy.exceptions.DownloadTimeoutError: Getting https://… took longer than 180.0 seconds. Older versions raise Twisted’s TimeoutError, and it prints User timeout caused connection failure.

requests: connect and read are separate clocks

import requests

try:
    r = requests.get("https://example.com/page", timeout=(3.05, 27))
except requests.exceptions.ConnectTimeout:
    ...  # never connected: safe to retry
except requests.exceptions.ReadTimeout:
    ...  # connected, no answer: the server may have done the work

The read timeout counts the wait between bytes, not the whole download. A page that trickles in can run well past 27 seconds. The docs say it plainly: neither timeout is wall clock time.

The docs suggest a connect timeout a bit above a multiple of 3, the default TCP retransmission window. Hence 3.05.

Playwright: catch the right TimeoutError

from playwright.sync_api import sync_playwright, TimeoutError as PlaywrightTimeoutError

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()
    try:
        page.goto("https://example.com", wait_until="domcontentloaded", timeout=60_000)
        page.wait_for_selector("h1")
    except PlaywrightTimeoutError:
        print("timed out")
    browser.close()

Playwright’s TimeoutError is not Python’s built-in one. Import it under another name, as the docs do. Otherwise your except TimeoutError won’t catch it.

wait_until takes load (default), domcontentloaded, networkidle or commit. commit returns as soon as the response arrives and the page begins loading.

Playwright Test has its own clock: 30 seconds per test. You’ll see it as Test timeout of 30000ms exceeded. That one fires even when page.goto has no limit.

Puppeteer: networkidle waits for quiet

await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 60000 });
await page.waitForSelector('h1');

networkidle0 waits for 0 open connections for 500 ms, networkidle2 for no more than 2. A page with live chat, analytics or polling may never get there. Change the default for a whole page with page.setDefaultNavigationTimeout().

curl: test the hops by hand

curl -v --connect-timeout 10 --max-time 60 -x http://user:pass@proxy.example:8000 https://example.com/

--connect-timeout limits only the connection phase. --max-time limits the whole transfer. With --retry <n>, curl treats a timeout as a transient error and retries it.

Proxy headers that name the timeout

RFC 9209 gives proxies a standard Proxy-Status header. Its timeout codes:

value means
dns_timeout the proxy timed out looking up the site’s IP
connection_timeout the proxy’s connection to the next hop timed out
connection_read_timeout connected, but no new data came
http_response_timeout the full response didn’t arrive within the proxy’s limit

The RFC’s sample:

HTTP/1.1 504 Gateway Timeout
Proxy-Status: ExampleCDN; error=connection_timeout

Bright Data sends this header alongside its own codes:

status x-brd-err-code means Proxy-Status error
408 peer_30040 Peer did not connect to destination due timeout connection_timeout
502 target_40020, target_40021 Destination host connect timeout connection_timeout
499 client_10140 your client closed the connection first http_request_error

Bright Data reads a 408 as “networking lags or blocks”, or an incorrect target URL.

Edge cases

  • httpx’s 5 s default catches people moving from requests. A slow API that worked before now throws ReadTimeout.
  • Scrapy per request: set download_timeout through Request.meta. Third-party download handlers may ignore it.
  • aiohttp’s 300 s is total, for the whole operation. requests and httpx limits are per phase.

A browser timeout is never a status code. Playwright’s page.goto returns normally for any valid HTTP status, 404 and 500 included, and Puppeteer’s does the same in headless shell. It throws only when something breaks: a bad certificate, an invalid URL, a server that doesn’t answer, or the clock running out, so Timeout 30000ms exceeded means the wait condition you chose never came true in time. It doesn’t mean that the site sent an error.

The two Chromium codes divide the same way as connect and read. ERR_CONNECTION_TIMED_OUT (-118) is a connection attempt that timed out. ERR_TIMED_OUT (-7) is the general “an operation timed out”.

Proxy-Status is worth logging when it shows up. It names the proxy that failed and which step timed out, so you know which hop to fix.

Questions

Why does page.goto time out when the page already looks loaded?

By default page.goto waits for the load event, and a page full of trackers and ads can keep loading long after you see it. With Puppeteer's networkidle2, a page that keeps 2 or more long-running connections open never settles. Use waitUntil: 'domcontentloaded', then wait for the one element you need.

Does Python requests have a default timeout?

No. The requests docs say it does not time out unless you set a timeout, so a script can hang for minutes or more. Pass one on every call, for example timeout=(3.05, 27): 3.05 seconds to connect, 27 seconds of silence while reading.

Tools that get past it

ToolPrice
Axios: Promise-based HTTP client for the browser and Node.js, with request and response interceptors and TypeScript types.Free
HTTPX: Python HTTP client with sync and async APIs and HTTP/2 support.Free
Playwright: Microsoft's framework to drive Chromium, Firefox and WebKit from code with one API. Made for testing; also used to scrape.Free
Puppeteer: JavaScript library to control Chrome and Firefox from code.Free
Requests: The classic simple HTTP library for Python.Free
Scrapy: Python framework for crawling sites and extracting data: request queue, retries, pipelines, exports. Large plugin ecosystem.Free

Sources

  1. Requests docs: Timeouts (connect, read, no default) requests.readthedocs.io
  2. psf/requests source: exceptions.py (ConnectTimeout, ReadTimeout) github.com
  3. psf/requests source: adapters.py (urllib3 timeout errors → requests errors) github.com
  4. urllib3 source: connection.py ('Connection to … timed out') github.com
  5. urllib3 source: connectionpool.py ('Read timed out') github.com
  6. urllib3 source: exceptions.py ('Max retries exceeded with url') github.com
  7. HTTPX docs: Timeouts python-httpx.org
  8. HTTPX docs: Exceptions (TimeoutException base class) python-httpx.org
  9. HTTPX docs: Resource Limits python-httpx.org
  10. aiohttp docs: Client Quickstart (timeouts) docs.aiohttp.org
  11. Playwright docs (Node.js): page.goto playwright.dev
  12. Playwright docs (Python): page.goto playwright.dev
  13. Playwright docs (Python): TimeoutError playwright.dev
  14. Playwright docs: Timeouts (Playwright Test) playwright.dev
  15. Playwright issue #12182: page.goto Timeout exceeded, no load event (log output) github.com
  16. Puppeteer docs: Page.goto() pptr.dev
  17. Puppeteer docs: WaitForOptions (timeout default 30000) pptr.dev
  18. Puppeteer docs: PuppeteerLifeCycleEvent (networkidle0, networkidle2) pptr.dev
  19. Puppeteer issue #9842: Navigation timeout of 30000ms exceeded github.com
  20. Puppeteer issue #11247: TimeoutError: Navigation timeout of 30000 ms exceeded github.com
  21. Chromium source: net_error_list.h (TIMED_OUT -7, CONNECTION_TIMED_OUT -118) github.com
  22. libcurl docs: error codes (CURLE_OPERATION_TIMEDOUT 28) curl.se
  23. curl man page: --connect-timeout, --max-time, --retry curl.se
  24. libcurl docs: CURLOPT_CONNECTTIMEOUT (default 300 seconds) curl.se
  25. libcurl docs: CURLOPT_TIMEOUT (default never) curl.se
  26. curl source: multi.c (timeout messages) github.com
  27. axios source: http adapter ('timeout of …ms exceeded') github.com
  28. axios source: defaults (timeout 0) github.com
  29. Node.js docs: fetch is based on undici nodejs.org
  30. undici docs: Client (connect, headers, body timeouts) github.com
  31. undici source: errors.js (UND_ERR_CONNECT_TIMEOUT) github.com
  32. Scrapy docs: DOWNLOAD_TIMEOUT docs.scrapy.org
  33. Scrapy 2.20.0 source: default_settings.py (RETRY_EXCEPTIONS, RETRY_TIMES) github.com
  34. Scrapy 2.20.0 source: http11.py ('took longer than') github.com
  35. Twisted source: error.py ('User timeout caused connection failure') github.com
  36. W3C WebDriver: Timeouts (page load 300,000 ms) w3.org
  37. RFC 9209: The Proxy-Status HTTP Response Header Field rfc-editor.org
  38. Bright Data docs: Proxy errors troubleshooting docs.brightdata.com
  39. Bright Data docs: Introduction to Residential proxies docs.brightdata.com
  40. Oxylabs docs: Residential Proxies response codes developers.oxylabs.io
  41. Oxylabs help center: Start using Dedicated ISP Proxies (504 about 60s) developers.oxylabs.io