HTTP 499 Client Closed Request Error - Meaning & Fix

The HTTP 499 status code occurs when a client (scraper) closes the connection before the server can respond. This error is specific to nginx web servers and often happens when scraping websites with long response times or strict request-handling policies.

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

  • Minimize unnecessary headers and cookies in requests to avoid excessive request overhead.

  • 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