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
Common causes
- Invalid response headers: uppercase names, illegal characters, or a
Connectionheader 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.
# 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/nullFixes
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.
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.
Related reading
- ERR_QUIC_PROTOCOL_ERROR: how to fix it: Fix ERR_QUIC_PROTOCOL_ERROR: HTTP/3 over QUIC blocked by firewalls, proxies or antivirus, broken UDP paths, and server and CDN configuration fixes.
- 502 Bad Gateway: causes and how to fix it: What a 502 Bad Gateway means, the common causes behind Nginx, load balancers and CDNs, how to find yours and how to stop it happening again.
- ERR_SSL_PROTOCOL_ERROR: how to fix it: Fix ERR_SSL_PROTOCOL_ERROR ("This site can't provide a secure connection"): HTTP on port 443, old TLS versions, broken TLS setups, proxies and antivirus.
- ERR_CONTENT_DECODING_FAILED: how to fix it: Fix ERR_CONTENT_DECODING_FAILED: wrong Content-Encoding headers, double gzip compression, broken Brotli, PHP output buffering and proxies, with tests.
- ERR_ADDRESS_UNREACHABLE: how to fix it: Fix ERR_ADDRESS_UNREACHABLE: no route to the server, wrong IP in DNS, IPv6 problems, private addresses and firewalls, for visitors and server owners.
- ERR_INTERNET_DISCONNECTED: how to fix it: Fix ERR_INTERNET_DISCONNECTED in Chrome: reconnect Wi-Fi, check the router, disable proxies and VPNs, reset network settings, and when apps say offline.
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.