Aller au contenu principal

Guides / Corriger : guides pour les erreurs que l'on rencontre vraiment

ERR_EMPTY_RESPONSE: causes and fixes

ERR_EMPTY_RESPONSE means the connection was accepted but the server sent back zero bytes, rather than a proper HTTP response or even an error page. The TCP handshake succeeded; whatever should have answered the request never did.

What ERR_EMPTY_RESPONSE means

This error sits later in the request lifecycle than a refused or timed-out connection. The browser successfully connects to the server, and in an HTTPS request the TLS handshake usually completes too, but after the request is sent, the connection closes with no HTTP status line, no headers, and no body at all. That is different from a 500 or 502 error page, which is still a complete HTTP response; here, there is nothing to parse because nothing came back.

This makes ERR_EMPTY_RESPONSE harder to diagnose from the client side than most connection errors, since every layer up to and including the transport connection worked correctly. The fault sits specifically in whatever generates the HTTP response: the application process, the framework handling the request, or a proxy in front of it that closed the socket instead of passing along, or generating, a proper error page.

How the error appears

Chrome shows "This site can't be reached ... ERR_EMPTY_RESPONSE" once the connection closes without data. curl reports the same condition in plain terms:

curl -v https://example.com/api/generate
* Connected to example.com (203.0.113.10) port 443
> GET /api/generate HTTP/1.1
> Host: example.com
*
* Empty reply from server
curl: (52) Empty reply from server

"Empty reply from server" is curl's exact wording for this condition, and it is the clearest signal that the connection itself worked while whatever should have generated a response did not.

What causes ERR_EMPTY_RESPONSE

  • A worker process crashed while handling the request. An unhandled exception, an out-of-memory kill, or a segmentation fault can close the connection before any response is written.
  • The application timed out behind a proxy that closes silently. Some reverse proxy configurations close the client connection without sending an error page when the backend takes too long, instead of returning a proper 502 or 504.
  • Plain HTTP is being served on the HTTPS port, or the reverse. A client speaking TLS to a port serving plain HTTP, or the other way around, gets no valid response the client's protocol layer can parse, and it often surfaces as an empty reply rather than a clear protocol error.
  • A browser extension or local proxy interferes with the response. Ad blockers, privacy extensions, or a corporate proxy that inspects and occasionally mishandles a response can strip it down to nothing.
  • A load balancer health check marks the backend unhealthy mid-request, closing the connection to that backend before the response finishes.

How to tell whose fault it is

Disable browser extensions or try an incognito window first; a client-side extension is one of the more common and easiest to rule out causes. If the empty response persists with extensions off, test from a second device or network to rule out a local proxy. If it happens consistently from multiple outside locations, the server or an application crash is the cause. Running an HTTP check from several checkpoints at once confirms whether the empty response is universal or tied to one client, extension, or network.

How to fix ERR_EMPTY_RESPONSE

If you are a visitor

  1. Try an incognito or private window with extensions disabled to rule out an ad blocker or privacy extension interfering with the response.
  2. Disable any local proxy or VPN and retry, since some intercept and occasionally mishandle responses instead of passing them through.
  3. Clear the browser cache for the site; a cached, corrupted connection state can occasionally resurface as this error on retry.
  4. Wait and reload. If the cause is a crashed worker process on the server, a process supervisor typically restarts it within seconds.

If you run the site

  1. Check application logs for a crash at the same timestamp as the failed request; an unhandled exception or an out-of-memory kill is the most common cause and usually leaves a clear trace.
  2. Confirm the correct protocol is bound to each port. Verify port 443 is actually serving TLS and port 80 is serving plain HTTP, not the reverse, with a direct check:
    curl -v https://example.com:443/
    curl -v http://example.com:80/
  3. Review the reverse proxy's timeout behavior. On nginx, a backend that exceeds proxy_read_timeout should still return a 504, so an empty response instead of a proper error page usually means something is closing the connection lower in the stack.
  4. Check load balancer and health check logs for a backend marked unhealthy around the time of the failure, which can close in-flight connections to that instance.
  5. Restart the affected worker or service if a crash is confirmed, and monitor logs closely after the restart for a repeat of the same error.

How to prevent ERR_EMPTY_RESPONSE

A worker crash under specific conditions, such as a particular request payload or a memory spike, can be intermittent enough to pass a manual test while still failing for real visitors on a schedule. Ongoing HTTP monitoring that checks status code and response body on a regular interval from 300+ checkpoints in 158 cities catches an empty response pattern that a single manual check would likely miss, with alerts by email, SMS, voice call, Slack, Telegram and more.

  • ERR_CONNECTION_RESET also ends a working connection early, but with an explicit reset rather than a silent close.
  • 502 Bad Gateway is a proper HTTP error response from a proxy, unlike the empty reply this error describes.
  • This site can't be reached covers the full set of connection errors Chrome groups under one heading.

Frequently asked questions

Is ERR_EMPTY_RESPONSE the same as a 502 error?

No. A 502 is a complete HTTP response with a status line, headers, and usually a body, sent deliberately by a proxy. ERR_EMPTY_RESPONSE means no HTTP response was sent at all, just a closed connection.

Why does this only happen on one specific page?

A page that triggers this error consistently, while others load fine, usually points at a crash in the code path that specific page or API endpoint uses, rather than a general server or network problem.

Can an ad blocker really cause this error?

Yes. Some ad blockers and privacy extensions intercept and rewrite responses, and a bug or an aggressive rule can occasionally strip a legitimate response down to nothing rather than blocking it cleanly.

Does ERR_EMPTY_RESPONSE mean my data was lost?

Not necessarily for a GET request, but for a form submission or an API call that changes data, check whether the action actually completed on the server before retrying, since the client cannot tell from an empty response whether the request was processed.

Why does curl say "Empty reply from server" instead of an error code?

Because there is no HTTP response to read a status code from. curl's own wording describes the transport-level event, a closed connection with no data, that is one layer below the HTTP protocol itself.

Could my own network be closing the connection instead of the server?

It is less common than a server-side cause but does happen. A corporate proxy or firewall that terminates long-running connections after a fixed idle period can produce the same symptom; testing the same request from a different network rules this out quickly.

Vérifier maintenant

Lancez la vérification gratuite sur votre propre site, sans créer de compte.

HTTP check

Surveiller en permanence

Soyez alerté dès que quelque chose casse : HostTracker vérifie depuis plus de 300 emplacements et vous prévient par e-mail, SMS, Slack, Telegram et plus encore.

Fonctionnalités HostTracker

Plus dans cette section: Corriger : guides pour les erreurs que l'on rencontre vraiment