Skip to content

Troubleshooting guide

ERR_HTTP2_PROTOCOL_ERROR: causes and how to fix it

The browser received something on an HTTP/2 connection that broke the protocol, or a stream was reset part-way. The real cause is usually behind the proxy.

3 min read10 sectionsUpdated

On this page

Key points

  • HTTP/2 is stricter than HTTP/1.1 about headers.
  • Testing with --http1.1 quickly tells you whether HTTP/2 is involved.
  • A backend dying mid-response is reported as a protocol error.
  • Disk-full proxies can truncate responses.

What it means

Chrome saw an invalid frame, or the server reset the stream with an error. Because HTTP/2 multiplexes many requests on one connection, the failure typically hits one resource, leaving the rest of the page loading. The message says little about the underlying reason.

Common causes

  • Invalid response headers: uppercase names, illegal characters, or a Connection header forwarded from the app.
  • The upstream crashed or closed in the middle of a response.
  • A full disk on the proxy, so Nginx cannot write its temporary buffer files.
  • Header or buffer limits exceeded on the proxy.
  • Antivirus or VPN software inspecting HTTPS on the visitor's machine.
  • Compression mismatches that yield a corrupted response body.

Diagnose it

Compare HTTP/2 against HTTP/1.1. If only HTTP/2 fails, a protocol-level rule is being broken. If both fail, it is a backend problem that HTTP/2 only reports differently.

bash
# HTTP/2, verbosely
curl -sv --http2 https://example.com/page -o /dev/null 2>&1 | tail -12

# The same request over HTTP/1.1
curl -sv --http1.1 https://example.com/page -o /dev/null 2>&1 | tail -6

# Inspect response headers for anything unusual
curl -sI --http1.1 https://example.com/page

# Proxy errors and disk space
sudo tail -30 /var/log/nginx/error.log
df -h /var/lib/nginx /var/cache/nginx 2>/dev/null

Fixes

Remove illegal headers in your application or framework, such as Connection and Transfer-Encoding passed through a proxy. Free up the disk if Nginx logs show No space left on device on a temp file. Increase proxy_buffer_size when upstream headers are large. Fix the crash if the upstream is dying. As a visitor, try another network and turn off HTTPS scanning in your antivirus.

Using net-export for hard cases

When you cannot reproduce it using curl, open chrome://net-export, capture a session and load the file in the NetLog viewer. It shows the HTTP/2 session events, including which stream was reset and the exact error code, such as PROTOCOL_ERROR or INTERNAL_ERROR. INTERNAL_ERROR points to a problem on the server's side, while PROTOCOL_ERROR suggests malformed framing or headers. Check as well whether the failures concentrate on a single large response or on a particular URL, because that narrows things down.

Catch it automatically

These errors occur in real browsers and do not always show up in server logs, so real-user monitoring is the best way to see them, along with the affected page and browser. Add a browser check to a critical page.

Frequently asked questions

Why does it work in Firefox but not Chrome?

Browsers differ in how strictly they enforce the protocol, so the server may be sending something invalid.

Should I disable HTTP/2?

Only as a temporary workaround. Find and fix the underlying cause.

Is it a server problem?

If every visitor sees it, yes. If only one does, check their antivirus or network.

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.