Troubleshooting
Debug HTTP Errors
Step-by-step guides for diagnosing and fixing common HTTP failures. Each guide walks through the diagnosis process, common causes, and concrete solutions.
< 429 Too Many Requests01429 Too Many Requests: Fix It with Retry-After and Backoff
Fix 429 Too Many Requests as an API client: honor Retry-After, back off exponentially with jitter, read RateLimit headers, handle GitHub and LLM limits.
< cf-cache-status: DYNAMIC02CDN Not Caching: cf-cache-status DYNAMIC, BYPASS, MISS
CDN not caching? Read cf-cache-status DYNAMIC, BYPASS, MISS or X-Cache: Miss from cloudfront, then fix Set-Cookie, Cache-Control, Vary and cache keys.
< DNS_PROBE_FINISHED_NXDOMAIN03DNS_PROBE_FINISHED_NXDOMAIN: Find and Fix DNS Failures
Fix DNS_PROBE_FINISHED_NXDOMAIN by comparing authoritative and cached answers, then checking VPN DNS, hosts files, Docker, CoreDNS and DNSSEC.
< NET::ERR_CERT_AUTHORITY_INVALID04ERR_CERT_AUTHORITY_INVALID: Chain and CA Trust Fixes
Fix ERR_CERT_AUTHORITY_INVALID by inspecting missing intermediates, private CAs, TLS inspection and the CA stores actually used by curl, Node and Python.
< NET::ERR_CERT_DATE_INVALID05ERR_CERT_DATE_INVALID: Expired Certificates and Fixes
Fix NET::ERR_CERT_DATE_INVALID by checking certificate dates, client clocks, failed renewals, stale nginx deployments and expired intermediate certificates.
< ERR_CONNECTION_REFUSED06ERR_CONNECTION_REFUSED: Localhost, Docker and Node Fixes
Fix ERR_CONNECTION_REFUSED by checking listeners, localhost IPv4/IPv6, Docker port mappings, firewall rejection, service crashes and Kubernetes endpoints.
< This site can't be reached. The connection was reset. ERR_CONNECTION_RESET07ERR_CONNECTION_RESET and ECONNRESET: Find the RST
Fix ERR_CONNECTION_RESET, ECONNRESET and curl (56) Connection reset by peer: keep-alive races, body limits, firewalls, crashes. Find who sent the RST.
< ERR_CONNECTION_TIMED_OUT08ERR_CONNECTION_TIMED_OUT: Trace TCP Connection Failures
Fix ERR_CONNECTION_TIMED_OUT by tracing SYN packets, checking firewalls and stale DNS, testing IPv6, and separating backlog pressure from MTU stalls.
< ERR_CONTENT_DECODING_FAILED09ERR_CONTENT_DECODING_FAILED: Fix Broken Compression
Fix ERR_CONTENT_DECODING_FAILED by comparing raw bytes with Content-Encoding, checking double compression, truncated gzip and cached encoding variants.
< ERR_EMPTY_RESPONSE10ERR_EMPTY_RESPONSE: Find Who Closed the Connection
Debug ERR_EMPTY_RESPONSE and curl empty replies by checking app crashes, wrong ports, nginx 444, Docker listeners, keep-alive races and request framing.
< net::ERR_HTTP2_PROTOCOL_ERROR11ERR_HTTP2_PROTOCOL_ERROR: Find the Broken Response
Debug Chrome ERR_HTTP2_PROTOCOL_ERROR and curl (92): compare HTTP versions, inspect invalid headers and body lengths, then trace the failing hop.
< net::ERR_INCOMPLETE_CHUNKED_ENCODING12ERR_INCOMPLETE_CHUNKED_ENCODING: Fix Truncated Responses
Fix ERR_INCOMPLETE_CHUNKED_ENCODING by finding missing final chunks, upstream crashes, nginx read timeouts, buffering failures and stalled SSE streams.
< This site can't provide a secure connection. example.com sent an invalid response. ERR_SSL_PROTOCOL_ERROR13ERR_SSL_PROTOCOL_ERROR: Causes and Fixes in Chrome
Fix ERR_SSL_PROTOCOL_ERROR: plain HTTP on port 443, TLS version mismatches, SNI, TLS-inspecting proxies and Cloudflare, with curl and openssl checks.
< This page isn’t working. example.com redirected you too many times. Try deleting your cookies. ERR_TOO_MANY_REDIRECTS14ERR_TOO_MANY_REDIRECTS: Find and Break the Redirect Loop
Fix ERR_TOO_MANY_REDIRECTS (redirected you too many times): Cloudflare Flexible SSL, WordPress URLs, nginx HTTPS loops and cookie loops, diagnosed with curl.
< Mixed Content: The page at 'https://example.com/' was loaded over HTTPS, but requested an insecure resource 'http://example.com/api/items'. This request has been blocked; the content must be served over HTTPS.15Mixed Content Blocked: HTTPS Page Requesting HTTP
Fix 'Mixed Content: The page was loaded over HTTPS, but requested an insecure resource': find the http:// URLs, add upgrade-insecure-requests, fix proxies.
< Your connection is not private. Attackers might be trying to steal your information from example.com (for example, passwords, messages, or credit cards). NET::ERR_CERT_COMMON_NAME_INVALID16NET::ERR_CERT_COMMON_NAME_INVALID: Fix the Name Mismatch
Fix NET::ERR_CERT_COMMON_NAME_INVALID and related ERR_CERT errors: SAN vs CN, wildcard limits, missing SNI, expired or incomplete chains, with openssl checks.
< 413 Request Entity Too Large17nginx 413 Request Entity Too Large: client_max_body_size
Fix nginx 413 Request Entity Too Large: raise client_max_body_size, then check Cloudflare limits, ingress-nginx proxy-body-size and PHP upload limits.
< 502 Bad Gateway18nginx 502 Bad Gateway: Causes and Fixes by Error Log
Fix nginx 502 Bad Gateway by matching the error log: connection refused, prematurely closed connection, php-fpm socket permissions, too big header, keepalive.
< 504 Gateway Time-out19nginx 504 Gateway Timeout: Fix Upstream Timed Out (110)
Fix nginx 504 Gateway Time-out and 'upstream timed out (110)': proxy_read_timeout, fastcgi_read_timeout, ALB idle timeout, and Cloudflare 524 compared.
< upstream sent too big header while reading response header from upstream20nginx Upstream Sent Too Big Header: Fix the 502
Fix nginx upstream sent too big header: measure response headers, size proxy or FastCGI buffers, and shrink oversized Set-Cookie and redirect headers.
< Access to fetch at 'https://api.example.com/items' from origin 'https://app.example.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.21No 'Access-Control-Allow-Origin' Header Is Present: Fix CORS
Fix the CORS error 'No Access-Control-Allow-Origin header is present on the requested resource' with working Express, nginx, S3, Workers and Django fixes.
< 400 Bad Request: Request Header Or Cookie Too Large22Request Header Or Cookie Too Large: Fix 400 and 431
Fix 400 Request Header Or Cookie Too Large and 431 errors: find the oversized cookie or token, then check nginx, Apache, Node, ALB and Cloudflare limits.
< Set-Cookie sent, but Cookie never comes back23Cookie Not Being Sent
Trace missing cookies through storage, Domain, Path, Secure, SameSite, CORS credentials, expiration, and browser policy.
< Response to preflight request doesn’t pass access control check24Failed CORS Preflight
Inspect the OPTIONS exchange and fix mismatched origins, methods, headers, credentials, redirects, or proxy handling.
< No ‘Access-Control-Allow-Origin’ header is present on the requested resource25Debugging CORS Errors
Diagnose and fix cross-origin resource sharing errors. Covers preflight failures, missing headers, and credential misconfigurations.
< HTTP/1.1 403 Forbidden26Debugging 403 Forbidden
Understand why access is denied and how to fix it. Covers auth vs authz, role checks, IP blocks, and CSRF.
< HTTP/1.1 500 Internal Server Error27Debugging 500 Internal Server Error
Find and fix server-side failures. Covers reading logs, common causes, error handling patterns, and prevention.