Skip to content

ERR_EMPTY_RESPONSE through a proxy: who closed the connection

Chrome shows ERR_EMPTY_RESPONSE when a server accepts the connection, takes the request and closes without sending anything back. curl calls the same event (52) Empty reply from server. Through a proxy, either the proxy or the website did the closing, and one plain http:// request with curl -v shows which.

Reviewed by John Hale. Last updated .

What it looks like

Chrome
This page isn't working
example.com didn't send any data.
ERR_EMPTY_RESPONSE

curl 8.7.1
curl: (52) Empty reply from server
curl: (56) Proxy CONNECT aborted

Python requests and Node.js fetch
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
requests.exceptions.ProxyError: ... ProxyError('Unable to connect to proxy', RemoteDisconnected('Remote end closed connection without response'))
TypeError: fetch failed  cause: SocketError: other side closed (UND_ERR_SOCKET)

What does ERR_EMPTY_RESPONSE mean?

Chromium's network error list defines ERR_EMPTY_RESPONSE (-324) as the server closing the connection without sending any data. The request left your machine and reached something that took it. No status line, header or byte came back before the close.

It is not a reset and not a timeout. A reset is an abrupt cut, and a timeout is silence on a connection that stays open. In our tests a server that read the request and then closed gave curl (52), while one that closed without reading it gave a reset, curl (56).

For an https:// site through an HTTP proxy, the close can come at two points: the proxy closing instead of answering CONNECT, which curl prints as Proxy CONNECT aborted, or the site closing inside the tunnel after TLS.

What causes ERR_EMPTY_RESPONSE through a proxy?

Most likely first.

  1. The proxy dropped a request it would not serve. Some proxies close without an HTTP error when the client's address is not on their allowlist, the login is missing or the destination is blocked. A proxy that explains itself answers 407 or 403 instead.
  2. The wrong protocol for the port. Plain HTTP sent to a port that expects TLS or SOCKS5 is read as garbage, and the connection is closed. Check that the proxy type set in the browser or tool matches the port.
  3. The site closed on a request it did not accept. Servers, and the filters in front of them, drop some requests without answering: a missing or unusual Host or User-Agent, an address range they do not serve, or a request rate over their limit.
  4. A reused connection that was already closed. A keep-alive connection the server or proxy has timed out is closed the moment the next request arrives on it. Browsers retry this themselves. Scripts with their own connection pools see it as an empty response.
  5. The server failed mid-request. A crashed or restarting process behind a load balancer closes the connection with nothing sent. This one is the site's to fix and usually passes on its own.
  6. Software on your machine. Extensions, antivirus web shields and a local proxy app that has stopped can swallow the response. An Incognito window with extensions off rules out the first.

How do you tell who closed the connection?

  1. Send one plain request and watch who closes

    Empty reply from server on a plain http:// URL to a site that certainly works means the proxy closed the connection. A normal 200 here moves suspicion to the site you were opening.

    A known-good site through the proxy
    curl -v -x http://HOST:PORT -U "USER:PASS" http://example.com/ -o /dev/null

  2. Check the tunnel for an https:// site

    CONNECT 000 | exit 56 with Proxy CONNECT aborted: the proxy closed without answering the tunnel request. CONNECT 200 | site 000 | exit 52: the tunnel opened and the site closed without answering.

    Proxy's answer, site's answer, exit code
    curl -s -o /dev/null -w "CONNECT %{http_connect} | site %{http_code} | exit %{exitcode}\n" \
      -x http://HOST:PORT -U "USER:PASS" https://TARGET/

  3. Compare without the proxy and without your profile

    Load the page with the proxy off, then through the proxy in an Incognito window. Empty without the proxy too: the site or your machine. Empty only through the proxy: the proxy, or how the site treats that exit. Chrome records the exchange at chrome://net-export/ if you need a trace.

How do you fix ERR_EMPTY_RESPONSE?

  • Match the proxy type to its port

    Set HTTP for an HTTP port and SOCKS5 for a SOCKS5 port, and enter the username and password where the tool asks for them. A proxy that needs a login and receives none may close instead of asking.

  • Clear what the browser holds for the site

    Reload first: Chrome retries a dead keep-alive connection on its own. If one site keeps failing, clear its cookies and site data, and close idle connections with Flush socket pools at chrome://net-internals/#sockets.

  • In scripts, retry once on a fresh connection

    An empty reply on a reused connection is safe to retry for requests that can be repeated. In curl, --retry-all-errors covers 52. In Python, mount an adapter with Retry(connect=2, read=2). In Node.js, catch UND_ERR_SOCKET and send again.

    curl: two retries on any failure
    curl --retry 2 --retry-all-errors --retry-delay 1 -x http://HOST:PORT -U "USER:PASS" https://TARGET/

  • If one site answers with nothing, send less and send it normally

    A site that drops your requests is declining them. Send the headers a browser sends, stay under its rate limits and read its terms: a decision the site made on purpose is not overturned by a different exit.

If you use TrueProxies

The gateway does not close silently on its HTTP and HTTPS ports. A refused login is answered with 407 Proxy Authentication Required and a sentence in X-Proxy-Reason, a destination it cannot reach with 502 or 503, and a blocked destination with 403.

SOCKS5 is the exception. The protocol has no field for text, so a refused login ends the handshake and the connection closes, which a browser or tool can show as an empty response. Send the same username and proxy password once through port 8080 to read the reason:

The gateway's reason, if it refused
curl -v -x http://HOST:8080 -U "USER:PASS" https://TARGET/ -o /dev/null 2>&1 \
  | grep -iE "x-proxy-reason|^< HTTP|^curl: \("

Inside an open tunnel an empty response is the website's: the gateway passes bytes through and adds none.

Test the proxy from outside your network

The free proxy checker connects from our servers and reports the failed stage as a code, so you can tell a proxy problem from one on your computer or network.

Run the proxy checker

Questions about ERR_EMPTY_RESPONSE

What does ERR_EMPTY_RESPONSE mean?

The server, or a proxy in front of it, accepted the connection and closed it without sending any data. Chrome shows it as: this page isn't working, the site didn't send any data.

Is ERR_EMPTY_RESPONSE the same as curl error 52?

Yes, the same event seen by a different client: the peer closed the connection without sending a response. curl prints (52) Empty reply from server.

Is ERR_EMPTY_RESPONSE caused by my proxy?

It can be. Send one plain http:// request through the proxy with curl -v. If a site that works everywhere returns an empty reply only through the proxy, the proxy is closing the connection.

How is it different from ERR_CONNECTION_RESET?

A reset is an abrupt cut, often mid-transfer. An empty response is a close before any data. They share causes, but an empty response more often means the other side took your request and chose not to answer.