---
title: "ERR_CONNECTION_CLOSED — test your site, then fix it"
description: "Run a free live check to see whether ERR_CONNECTION_CLOSED is happening on your own domain right now, then work through the causes ranked most likely first."
canonical: "https://lemwatch.com/errors/err-connection-closed"
source: "https://lemwatch.com"
---

# ERR_CONNECTION_CLOSED: The server closed the connection unexpectedly

> The browser's connection was closed before it received a complete HTTP response. This can involve the origin, a proxy, a load balancer, or network infrastructure; connection reuse and timeout settings are common areas to investigate.

## Short answer

 The browser's connection was closed before it received a complete HTTP response. This can involve the origin, a proxy, a load balancer, or network infrastructure; connection reuse and timeout settings are common areas to investigate.

## What ERR_CONNECTION_CLOSED means

 Unlike an HTTP error response, the browser did not receive enough data to process a completed response. Compare server, proxy, and CDN logs for the same request window to identify which component ended the connection.

## Causes and fixes, most likely first

- A keep-alive timeout on the server is shorter than the proxy's, allowing a proxy to reuse a connection the server has already closed. Compare the configured timeouts across the origin and proxy, then set values that are compatible with the documented behaviour of both components.
- The worker process was recycled mid-request. Check worker recycling settings (max requests, memory limits) and enable graceful shutdown so in-flight requests finish.

## How to stop it happening again

- Document and review timeout settings across each hop, including CDN, load balancer, and origin.

## Check your own domain

 Repeated external probes can show whether the error is publicly reproducible. Pair that result with request and proxy logs before attributing the cause to connection reuse.

## Frequently asked questions

### Why does the error only happen on repeat visits?

 A repeat-visit pattern can point to reuse of a connection that an upstream component has already closed. It is a useful hypothesis, not a diagnosis by itself; confirm it with proxy and origin logs and timeout settings.



## Lemwatch at a glance

- What it is: website monitoring that checks uptime, page changes, SEO, security, SSL and speed in one tool.
- Free plan: 10 sites, no time limit, all check types.
- Pro: $19/mo, 50 sites, public API and webhooks.
- Agency: $59/mo, 150 sites, white-label status pages.
- Source: https://lemwatch.com/pricing (facts verified from the product's own plan limits).



## Related

- [All website error codes](https://lemwatch.com/errors)
- [ERR_CONNECTION_RESET](https://lemwatch.com/errors/err-connection-reset)
- [ERR_EMPTY_RESPONSE](https://lemwatch.com/errors/err-empty-response)
- [ERR_CONNECTION_TIMED_OUT](https://lemwatch.com/errors/err-connection-timed-out)
- [HTTP 502](https://lemwatch.com/http-status-codes/502)
- [Free Uptime & response check](https://lemwatch.com/tools/website-uptime)
- [ERR_CONNECTION_REFUSED: The server actively refused the connection](https://lemwatch.com/errors/err-connection-refused)
- [ERR_CERT_REVOKED: The certificate was revoked by its issuer](https://lemwatch.com/errors/err-cert-revoked)
