Opyntel

499 status code: when the client gives up first

A 499 status code, Client Closed Request, is a non-standard code that nginx, and the proxies built on it, log when the client closed the connection before the server sent a response. The browser never sees it; it only shows in the server’s logs and metrics.

Why a 499 matters

A 499 usually means a user or an upstream proxy gave up waiting. A few from people closing a tab are normal. A run of them on one endpoint means that endpoint is slow, and often comes just before 504 timeouts.

What causes 499s

  • Slow responses that users abandon.
  • A client or load balancer timeout shorter than the time the server takes.
  • Mobile clients on poor connections dropping mid-request.
  • Health checks with tight timeouts hitting a slow endpoint.

How to fix it

  1. Compare p95 latency with the client timeout. If they are close, the endpoint is the problem.
  2. Speed up the work, or move it out of the request into a background job.
  3. Line up the timeouts so the proxy closest to the user waits longest and the app gives up first, with a proper error.

Is 499 a client error or a server error?

It sits in the 4xx range because the client closed the connection. In practice it is usually the server’s problem: the client left because the answer took too long. That is why it belongs with the 5xx errors when you measure how many requests failed.

How Opyntel treats 499

Opyntel counts 499 together with 5xx as failed requests, because a request the user gave up on failed just the same. Both feed each service’s error rate, which alerts you when it crosses your threshold, by email, Slack or SMS depending on your plan. Both also count toward the service’s health on one dashboard.

FAQ

499 status code questions, answered

What it means, who sends it and how it differs from a 504.

The client closed the connection before the server answered. nginx and proxies built on it log it.

No. The client has already gone, so nobody receives it; it only appears in server logs and metrics.

With 499, the client gave up first. With 504, the proxy gave up first and told the client the server timed out.

The alerts your platform doesn’t send.

One dashboard for everything you run, with the alerts your platforms leave out. Read-only, nothing to install in your apps.

See how it works