499 Client Closed Request / client prematurely closed connection Nginx / Apache Origin: Edge & web server OSI layer 7 · Application Last updated 5 Nov 2026

Nginx: [info] client prematurely closed connection while reading response header from upstream / access log status 499

The client (browser, mobile app, load balancer) disconnected before Nginx finished the response; Nginx logs status 499.

Exact message you may see client prematurely closed connection while reading response header from upstream499 Client Closed Request[info] client prematurely closed connectionnginx 499 status client closed connectionclient closed connection while waiting for request
Seen on: Nginx Linux

Meaning

Not an Nginx error code you send, but a log status. Causes: users navigating away, short client/proxy timeouts (ELB idle timeout 60 s, mobile apps), slow upstreams. Investigate slow endpoints, raise client/LB timeouts, use proxy_ignore_client_abort on; for must-complete jobs, and move long work to async processing.

Common causes

  • Slow upstream response and impatient client
  • Client/LB timeout shorter than the backend
  • Users cancelling requests
  • Mobile network drops
  • Health checks with short timeouts

⚡ Quick fix

  1. Find slow requests (add $request_time and $upstream_response_time to the log)
  2. Raise the client/LB timeouts or speed up the backend
  3. proxy_ignore_client_abort on; only for operations that must complete

Detailed fix by platform

Linux

  1. awk '$9==499 {print $7}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head

How to diagnose

  1. URLs — Which endpoints?
  2. Timing — request_time?
  3. Timeouts — Client/LB limits?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Edge & web server. Errors that are often confused with or caused by this one (click to open):

414 Request-URI Too Large / 400 Request Header Or Cookie Too Large — Nginx: 400 Bad Request — Request Header Or Cookie Too Large / client sent too long header line (Nginx / Apache)414 Request-URI Too L…499 — HTTP 499 Client Closed Request (Nginx) (HTTP)499500 — HTTP 500 Internal Server Error (HTTP)500504 — HTTP 504 Gateway Timeout (HTTP)504accept4() failed (24: Too many open files) — Nginx: [crit] accept4() failed (24: Too many open files) / open() failed (24: Too many open files) (Nginx / Apache)accept4() failed (24:…AH00015: Unable to open logs — Apache: AH00091: apache2: could not open error log file /var/log/apache2/error.log. AH00015: Unable to open logs (Permission denied) (Nginx / Apache)AH00015: Unable to op…AH00128: File does not exist — Apache: [core:info] AH00128: File does not exist: /var/www/html/favicon.ico (404) (Nginx / Apache)AH00128: File does no…Could not automatically find a matching server block — Certbot: Could not automatically find a matching server block for example.com. Set the `server_name` directive to use the Nginx installer (SSL / TLS)Could not automatical…499 Clien…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.