Skip to content
Log In Sign Up info@muvcloud.com

What the Error Means

Chrome and other Chromium-based browsers show "This site can't be reached" with a line saying the site unexpectedly closed the connection, and the code ERR_CONNECTION_CLOSED. A connection was made, then ended in an orderly way before the page arrived.

  • Refused: no connection was made at all, because nothing listens on the port; see ERR_CONNECTION_REFUSED.
  • Reset: the connection was aborted abruptly; see ERR_CONNECTION_RESET.
  • Closed: the connection ended normally but too early. A close right after the request, with no data at all, often shows as ERR_EMPTY_RESPONSE instead.

What a Visitor Can Try

  • Reload: a single close during a server restart goes away on the next try.
  • Use another network: mobile data instead of Wi-Fi shows whether the local network ends the connection.
  • Turn off a VPN or proxy for one test: they hold their own connections and can close them.
  • Clear the site's cookies and cache: a broken stored cookie can make the site's application fail on every request.
  • Try another browser: if the site opens there, an extension or a setting in the first browser is involved.

Reproduce It with curl

curl -v https://example.com/ -o /dev/null
curl -v --http1.1 https://example.com/ -o /dev/null

Watch where the output stops. If it ends during the TLS handshake, look at the TLS settings below. If curl sends the request and then reports an empty reply or a closed connection, the web server or the application behind it ended the connection.

Crashed or Restarted Workers

A worker process that crashes takes its open connections with it. Nginx logs a crash as a worker process that "exited on signal", and Apache as a child that exited with a signal such as "Segmentation fault". Search the logs:

sudo grep -i 'exited on signal' /var/log/nginx/error.log
sudo grep -i 'segmentation fault' /var/log/apache2/error.log
sudo journalctl -k --since '1 hour ago' | grep -i -E 'segfault|out of memory'

On AlmaLinux and Rocky Linux the Apache log is /var/log/httpd/error_log. Out-of-memory kills are covered in OOM killer; log locations in Nginx logs and Apache logs.

Keepalive and Timeouts

Servers close idle keepalive connections after a set time, and close requests whose headers or body arrive too slowly. In Nginx these are keepalive_timeout, client_header_timeout, and client_body_timeout. Very short values close connections that slow visitors still need.

When a proxy or load balancer sits in front of the web server and reuses connections to it, the back end should keep idle connections open longer than the proxy does. Otherwise the proxy sends a request on a connection the back end has closed a moment earlier.

Firewall and Security Rules

Connection limits, a web application firewall, or a fail2ban ban can end connections from one address. Check the bans:

sudo fail2ban-client status

Then run sudo fail2ban-client status JAIL_NAME for each jail listed. Unban an address you trust with sudo fail2ban-client set JAIL_NAME unbanip 203.0.113.10, and adjust the jail if it catches real visitors.

TLS Settings

openssl s_client -connect example.com:443 -servername example.com </dev/null

If the handshake fails, the server may have no certificate for that name and a default server block that rejects unknown names, or port 443 may be speaking plain HTTP. See openssl s_client for reading the output.

Confirm the Fix

Follow the error log while you reload the page, and run curl again. A status line such as HTTP/2 200 means the connection now carries a full response. Test once more from another network to rule out the local one.

sudo tail -f /var/log/nginx/error.log

Updated:

Linux VPS with Full Root Access

MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.

Cloud VPS Plans Starting at2.99 $/mo Cheap Linux VPS

No Limits on Service or Support

You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

Support specialist
  • 100% customer satisfaction goal
  • Our own hardware
  • 24/7 ticket and email support
  • 4 countries with locations