Your access log is filling up with 499s, the site feels sluggish, and the error log says nothing useful. An nginx 499 error means the client hung up before your server finished answering. The visitor never sees it, and the real cause is almost never the visitor. It's usually one request that took far too long.
Quick Answer: As of November 2026, a 499 ("client closed request") means the browser, load balancer or CDN in front of Nginx closed the connection before a response was ready. Fix it by logging
$request_timeto find the slow URLs, freeing up PHP-FPM workers, speeding up slow database queries, and making sure every timeout in front of Nginx is longer than the ones behind it.
Last verified: November 2026, against nginx 1.30.6 stable, PHP 8.5 and Ubuntu 26.04 LTS documentation.
Our team works through 20-30 client issues every day, and this is the checklist we run on those tickets, written so you can follow it yourself.
What a 499 Actually Means (and Why the Visitor Isn't to Blame)
A 499 status in the Nginx access log is recorded when the client closes the connection before Nginx sends a response, usually because a backend request ran longer than that client was willing to wait. As of November 2026 the code is still Nginx-specific and never reaches the visitor. A single stray 499 is normal noise; a steady stream on the same URLs points to a slow PHP, database or proxy layer.
Cloudflare's reference page on error 499 describes it the same way. The "client" is whatever opened the connection: often a CDN, load balancer or monitor rather than a browser.
The Hostaccent Team has been hosting since 2016 (UK-incorporated 2018), and across the 20-30 client issues we resolve each day, the 499s that matter nearly always trace back to a request that ran for 30, 60 or 100+ seconds while something upstream ran out of patience.
Is a 499 something my visitors actually see?
Not directly. Nginx logs it with 0 bytes sent because nobody is left to answer. The visitor saw a spinning tab, an app timeout, or a 524 page if Cloudflare sits in front of you.
| Status in your log | Who gave up | What it usually points to | First place to look |
|---|---|---|---|
| 499 Client Closed Request | The client (browser, CDN, load balancer) | Backend slower than the client's timeout | $request_time in the access log |
| 504 Gateway Timeout | Nginx itself | Backend slower than fastcgi_read_timeout | PHP-FPM slow log |
| 502 Bad Gateway | Nginx got no valid reply | PHP-FPM down or wrong socket path | systemctl status php8.5-fpm |
If 502s are showing up alongside the 499s, work through our 502 Bad Gateway Nginx fix guide too.
Why Nginx 499 Errors Happen: Causes Ranked by Real Frequency
Most 499s come from a request that's too slow, and the slowness usually sits in PHP-FPM or the database, not Nginx. We check them in this order:
- PHP-FPM is out of workers. When every child process is busy, new requests queue. A page that normally renders in 300ms can sit in line for 40 seconds during a traffic spike or bot crawl.
- A timeout mismatch in front of Nginx. A load balancer or CDN with a shorter timeout than your backend closes the connection first.
- Slow database queries. One unindexed query against a large
wp_postmetaor WooCommerce orders table can hold a worker for a full minute, which then feeds cause one. - Clients with very short timeouts. Uptime monitors and API integrations often give up after 2-10 seconds. Point one at a heavy page and every check becomes a 499.
- People genuinely leaving. Someone clicks away or loses signal. It's harmless and shows up as a thin, random scatter across many URLs.
In most real-world cases, a burst of 499 errors is a backend speed problem wearing a client-side label. The client gave up because PHP-FPM, the database or an upstream app took longer than its timeout, which is commonly 60 seconds for load balancers and 120 seconds for Cloudflare's proxy. Random, scattered 499s at under about 1% of requests are usually just visitors leaving.
Still blocked at Cloudflare?
Send the error code, affected hostname, and recent DNS or SSL changes. We will separate edge, origin, firewall, and certificate causes before proposing work.
How to Fix 499 Errors Step by Step
Timing data turns a vague 499 problem into a specific one. Once $request_time is in the Nginx access log, a cluster of 499s that all end near exactly 60 or 120 seconds points to a proxy or load balancer timeout. Scattered durations on the same few URLs point to slow PHP or database work instead, and that difference decides which step you need.
Step 1: Log how long each request takes
The default log format has no timing. Add this inside the http { } block of /etc/nginx/nginx.conf:
nginxlog_format timed '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" "$http_user_agent" ' 'rt=$request_time urt=$upstream_response_time'; access_log /var/log/nginx/access.log timed;
Run sudo nginx -t && sudo systemctl reload nginx, wait about 30 minutes, then check:
bash# Which URLs produce the most 499s? awk '$9 == 499 {print $7}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head -20 # How long did those requests run before the client left? grep '" 499 ' /var/log/nginx/access.log | grep -o 'rt=[0-9.]*' | cut -d= -f2 | sort -n | tail -20
If the rt= values bunch up at one number (60.0, 100.0, 120.0), jump to Step 3. If they're spread out and a handful of URLs dominate, work through Steps 2 and 4.
Insider Insight: Behind Cloudflare, every 499 appears to come from a few proxy IPs, hiding the bot that's hammering you. Add
set_real_ip_fromfor Cloudflare's ranges plusreal_ip_header CF-Connecting-IP;to see real addresses.
Step 2: Check whether PHP-FPM is running out of workers
Worker exhaustion is the most common cause we find, and PHP-FPM reports it plainly:
bashsudo grep -i "max_children" /var/log/php8.5-fpm.log | tail -5 ps --no-headers -o rss -C php-fpm8.5 | awk '{s+=$1} END {printf "%.0f MB avg per worker\n", s/NR/1024}'
A server reached pm.max_children setting line means requests are queueing. Divide the RAM you can spare for PHP by the per-worker figure: on a 4 GB VPS, keeping about 1.5 GB for MariaDB and the OS leaves 2.5 GB, so at around 80 MB per worker you land near 30. Then edit /etc/php/8.5/fpm/pool.d/www.conf:
inipm = dynamic pm.max_children = 30 pm.start_servers = 8 pm.min_spare_servers = 4 pm.max_spare_servers = 12 slowlog = /var/log/php8.5-fpm-slow.log request_slowlog_timeout = 5s request_terminate_timeout = 60s
Apply it with sudo php-fpm8.5 -t && sudo systemctl reload php8.5-fpm, but don't push pm.max_children past your RAM: swapping makes the 499s worse, as covered in why a VPS runs out of RAM.
One gotcha: on Linux, max_execution_time doesn't count time spent waiting on database queries or network calls, so a script stuck on a slow query runs far past it. request_terminate_timeout is the real wall-clock limit (see the PHP-FPM configuration reference).
Check: within an hour, the slow log should hold stack traces naming the plugin or function behind the slow requests.
Step 3: Put your timeouts in order with the Timeout Ladder
We call this the Timeout Ladder: every layer should wait slightly longer than the layer behind it, PHP shortest and the CDN longest. In order, a runaway request gets killed by PHP first and leaves a slow-log trace plus a clear 504. Upside down, the client walks away first and you get a silent 499 with no clue attached.
| Layer (inside to outside) | Setting | Example value |
|---|---|---|
| PHP-FPM | request_terminate_timeout | 60s |
| Nginx to PHP-FPM | fastcgi_read_timeout | 65s |
| Nginx to an app (Node, Python) | proxy_read_timeout | 65s |
| Load balancer in front of Nginx | Idle timeout | 75s or more |
| Cloudflare proxy | Proxy Read Timeout | 120s by default |
Set the PHP side in your location ~ \.php$ block with fastcgi_read_timeout 65s; (syntax in the Nginx fastcgi module docs); apps behind proxy_pass use the matching directive in the Nginx proxy module docs. Can't change the load balancer? Bring PHP and Nginx below its limit.
Across the 4,000+ sites Hostaccent has migrated since 2016, timeout values are one of the settings we most often find left behind: the new server runs stock defaults, the old one had been tuned for a slow nightly import, and the 499s start the day DNS switches over.
Pro Tip: Run
sudo nginx -T | grep -E 'read_timeout|send_timeout'before editing. It prints every timeout Nginx actually loaded, including ones buried in included files.
Live site and no time to experiment? Our engineers can track down and fix this exact 499 pattern for a small one-time fee, and you'll see the exact quote before anyone touches your server. Hosted with Hostaccent? Then issues like this are simply covered by support, free. Have an engineer fix it
Step 4: Find the slow query behind the slow page
If the slow log points at database calls, enable the MariaDB slow query log for a few hours:
sqlSET GLOBAL slow_query_log_file = '/var/log/mysql/mariadb-slow.log'; SET GLOBAL long_query_time = 2; SET GLOBAL slow_query_log = 1;
Summarise it with sudo mariadb-dumpslow -s t /var/log/mysql/mariadb-slow.log | head -30. Our guide to fixing high TTFB in WordPress covers the usual WordPress culprits, and the same queries often trigger MySQL "server has gone away" errors. Turn the log off afterwards; it grows fast.
Should I turn on fastcgi_ignore_client_abort?
Only for payment callbacks and webhooks. fastcgi_ignore_client_abort on; lets PHP finish after the client disconnects. Site-wide it backfires: abandoned requests keep holding workers, the queue grows, and you get more 499s.
How to Confirm the Fix and Keep 499s From Coming Back
After 24 hours of normal traffic, measure the share of 499s against total requests:
bashawk '{t++} $9 == 499 {c++} END {printf "%.2f%% of %d requests were 499s\n", c*100/t, t}' /var/log/nginx/access.log
A healthy result for a typical site in 2026 is a 499 share below about 1% of requests, spread thinly across many URLs, with rt= durations that don't cluster at 60 or 120 seconds. If the same three URLs still dominate, or durations still stop at one exact number, some layer of the stack is still slower than the timeout in front of it.
To keep it that way, leave the PHP-FPM slow log on at 5 seconds permanently, alert when 499s pass about 2% of requests for 10 minutes, and re-check the Timeout Ladder after every migration or CDN change.
Still seeing 499s after all of this?
- Only on
admin-ajax.php: a plugin's long AJAX call or an aggressive Heartbeat interval. Find it in the slow log. - With
rt=close to 0 seconds: an instant cancel, often a bot or an abandoned prefetch. Safe to ignore. - Across every URL: the whole server is starved. Check load,
iostat -x 5and memory, then use our Nginx and PHP-FPM performance tuning guide for Linux VPS.
Your Next Step: Fixed It, or Still Stuck?
Fixed it? Keep the Timeout Ladder in order and the slow log on, and the next nginx 499 error becomes a five-minute diagnosis instead of a lost afternoon. Still, chasing worker pools at midnight shouldn't be your job. On Hostaccent's VPS hosting you get full root access, free 30 Gbps DDoS protection and 24/7 engineers who handle exactly this. Start on the Standard plan at Standard: $12.00/mo, renewing at the same $12.00/mo. One honest caveat: cPanel or Plesk licences aren't included, so budget for one if you need a panel.
Still stuck? Open a ticket with our engineers for a small one-time fee, with the exact quote shown before any work starts.
Frequently Asked Questions
Is an nginx 499 error bad for SEO?
Not on its own. The status is only written to your log and is never served to Google as a page response. Occasional ones from Googlebot are normal, since crawlers drop connections too. The real risk is the slowness behind them: if crawlers keep waiting 30 seconds or more for pages, they tend to crawl less. Fix the slow requests and the ranking concern goes away with the log noise.
What is the difference between a 499 and a 504 error?
The difference is who gave up first. A 499 means the client closed the connection before Nginx had a response ready. A 504 means Nginx itself stopped waiting because the backend passed fastcgi_read_timeout or proxy_read_timeout, which default to 60 seconds. Both usually point at the same slow backend. If you see 499s instead of 504s, a timeout in front of Nginx is shorter than the one inside it.
Can Cloudflare cause 499 errors on my origin server?
Yes, and it's one of the most common pairings we see. When your origin takes longer than Cloudflare's proxy read timeout, which its documentation lists as 120 seconds by default, Cloudflare closes the connection and shows visitors a 524 page. Your origin Nginx log records that same request as a 499. The fix belongs on the origin: make that request faster, cache it, or move the long job into a background queue.
Why do health checks show up as 499 errors?
Health checkers usually wait only 2-10 seconds, and many point at the homepage by default. If that page renders slowly because PHP-FPM is busy or the cache is cold, the checker disconnects and Nginx logs a 499, and the load balancer may even mark a healthy server as down. Give the check its own location = /healthz { access_log off; return 200; } block and point the monitor there.
Should I just increase proxy_read_timeout to stop 499s?
Usually not. A 499 means the client gave up, not Nginx, so a longer Nginx timeout doesn't stop the client from leaving. It only keeps abandoned requests running longer and holding workers that new visitors need. Raise Nginx timeouts only when you're seeing 504s for jobs that legitimately run long, and keep them shorter than whatever sits in front of Nginx so the Timeout Ladder stays in order.












Discussion
Have a question or tip about this topic? Share it below — your comment will appear after review.