HTTP 499 Client Closed Request Error - Meaning & Fix

The HTTP 499 status code indicates that the connection was closed by the client before the server could respond. This code is specific to nginx web servers. It signifies that the client terminated the request prematurely.

Main causes

  • Client intentionally disconnects due to long server response times.

  • Network issues on the client side causing unintentional disconnections.

  • Client browser timeout when a request takes too long to complete.

  • Client-side script cancelling the request before the server can respond.

# Request example 
curl -X POST https://sandbox.oxylabs.io/ -H 'Accept: application/xml;q=0.9' -H 'Accept-Encoding: compress' -H 'User-Agent: Safari/537.36'

Try Scraper API with 5K results

Common fixes

  • Reduce the number of cookies sent with requests.

  • Shorten the length of the headers by minimizing the size of each header field.

  • Limit the use of redundant or unnecessary headers in the request.

  • Configure the server to accept larger header sizes if reduction is not feasible.

# Response example 
HTTP/1.1 499 Client Closed Request
Content-Type: text/plain
Content-Length: 0

Forget HTTP errors with Scraper API

Web scraper API

Self-Service

Public data delivery from a majority of websites

From

49

Useful resources

Get the latest news from data gathering world

I'm interested