Find out why your server answers with nothing
ERR_
Why a server closes without answering
The worker crashed handling the request
If the process serving the request dies from a fatal error or an out-of-memory kill, the operating system closes its connection. When the request had already been read in full, that close looks orderly, and the browser receives nothing.
A timeout ended the request silently
A request timeout that ends slow work by killing the worker or dropping the connection, rather than returning an error status, leaves the visitor with an empty response where a 503 or 504 would have explained what happened.
A rule closes without replying
Web servers can be told to drop some requests without a word, for example to shut out unwanted traffic. In nginx, the special code 444 does exactly this, so a rule that matches too much turns ordinary visits into empty responses.
A TCP proxy passed the hang-up on
An HTTP proxy that gets nothing from your server normally sends the visitor an error page. A proxy or load balancer that works at the TCP level only relays connections, so when your server hangs up, it hangs up on the visitor too.
Chromium returns ERR_
Reproduce the empty reply
# curl reports an empty response as exit code 52, "Empty reply from server"
# curl built on OpenSSL 3 or later can show 56 and "unexpected eof while reading" instead
curl -sS -o /dev/null https://yoursite.com/; echo "exit $?"
# Skip the CDN or load balancer and ask your server directly (203.0.113.10 stands in for its IP)
# Add -k if the origin's certificate is one only your CDN trusts
curl -sS -o /dev/null --resolve yoursite.com:443:203.0.113.10 https://yoursite.com/; echo "exit $?"
# On a Linux server, look for processes the kernel killed for memory
sudo dmesg -T | grep -iE 'out of memory|killed process'
Read the empty reply results
If the first command exits with 52 and the second succeeds, the empty reply comes from the layer in front of your server, so start with its logs and settings. If both exit with 52, your server closes the connection itself. Exit code 60 on the second command means curl couldn't verify the origin's certificate, as happens when only your CDN trusts it; rerun it with
-k. curl's error list describes code 52 as nothing returned from the server and 60 as a certificate that failed its check. Over HTTPS, a curl built on OpenSSL 3 or later reports a server that hangs up without ending the TLS session as 56 with unexpected eof while reading, since OpenSSL 3 treats that as an error, so read it as the same empty reply.Then match the time of a failed request against your server's error log and system log. A worker that crashed or was killed tends to leave a line at that minute, often with the request's address. If the
dmesgcommand prints a kill, the server ran out of memory and the kernel stopped the process named there.
How to fix an empty response
- Find the requests that come back emptyNote which pages fail and when. One page failing every time points at that page's code; every page failing at once points at the server, or at a process that keeps dying.
- Fix the crash or the memory shortfallRead the log entry for the failed request and fix the error it names. If the kernel killed the process for memory, find what's using it, or give the server more.
- Make timeouts answer with a statusSet request timeouts so the server returns an error status, such as 503 or 504, when work runs too long, instead of dropping the connection. A status code tells visitors and monitoring what went wrong.
- Narrow any rule that drops requestsReview rules that close connections without a reply, including bot blocking and rate limits, and make sure they match only the traffic you meant to stop.
Frequently asked questions
Why does only one page come back empty?
The code behind that page is probably crashing or running out of memory while it builds the response, for example on a large export or a heavy image resize. Request that page alone with curl while you watch the server's error log, so the failure shows up at the moment you trigger it.
Is an empty response the same as a 502 error?
They're related. When a proxy in front of your server gets an empty reply from it, the proxy usually turns that into an error page of its own, such as a 502 or Cloudflare's error 520. ERR_
How do I hear about empty responses before visitors do?
A worker that crashes only now and then can pass every check you run by hand, so the failures tend to reach you first as complaints from visitors. SiteCMD requests your home page every few minutes once you add the site, and it emails you when the site goes down and again once it recovers.
Look into related server failures
- Website reliabilityHear about it when your site goes down, not days later from a customer.
- Connection closedFind the layer that hangs up during the handshake or before the response, then fix its setup.
- Cloudflare error 520Find out why your origin sent Cloudflare an empty or unreadable response, then fix the crash, block or header behind it.
- 502 Bad GatewayFind the server behind your proxy that failed, then read the proxy's error log to see how.