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

**Code:** `499 Client Closed Request / client prematurely closed connection` · **Category:** Nginx / Apache · **Seen on:** Nginx, Linux

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/nginx-apache/nginx-499-client-closed-request)
