On this page
What this issue is
A load balancer is a service that spreads visitors across two or more servers (called nodes or backends). If one node breaks, for example it runs out of disk, has an old code version, or loses its database connection, the load balancer may keep sending it a share of traffic.
The result is random failure. With three nodes and one bad, roughly one request in three fails. Reload the page and it works, which is why this is so hard to spot and so easy to dismiss as a glitch.
- Visitor arrivesClicks an ad or link
- Load balancerPicks a node per request
- Node B (bad)Returns 500/502 or a stale page
- Form submitNever completes
- Lead and trackingNo lead, no conversion hit
The load balancer keeps routing some visitors to the broken node, so those visitors never reach the thank-you page.
Why it costs you leads or sales
Every visitor sent to the bad node sees an error, a blank page, a broken form or an old version of the site. You still pay for the click, but the lead or sale is lost. Because most requests succeed, dashboards look mostly fine and nobody raises an alarm.
It also skews your data. A bad node may serve a page without tracking tags, so conversions go missing from some visitors only. You see a vague drop rather than a clear outage.
Example: with 3 nodes and 1 broken, about one third of visitors hit the failing server. Numbers are illustrative.
How to check if your site has it
Look for failures that come and go with no change on your side. Common signs: customers say the form worked for a colleague but not for them, error rates sit at a steady few percent, or a fix you deployed seems to work only some of the time.
- Reloading the same page sometimes gives an error and sometimes works
- Server logs show 500, 502 or 504 errors from only one backend
- A recent deploy is visible on some loads but not others
- Tracking or form problems affect only a slice of sessions
- The load balancer dashboard shows one target as unhealthy or has no health check at all
To find the culprit, test each node directly, bypassing the load balancer. Replace the IP and hostname with your own. Run the loop below and compare status codes and response sizes.
for ip in 10.0.1.11 10.0.1.12 10.0.1.13; do
echo "== $ip"
curl -s -o /dev/null -w "%{http_code} %{size_download} bytes %{time_total}s\n" \
--resolve www.example.com:443:$ip https://www.example.com/
doneA node that returns a different status code, a different page size or a much slower time is your suspect. Also compare the deployed version, for example a build number in a response header or a file's checksum, across nodes.
How to fix it
Take the node out of rotation
In your load balancer, drain or deregister the bad target so it stops getting new traffic. This stops the losses straight away.
Find the cause
Check the node's disk space, memory, web server and app logs, database connection, and whether it runs the same code and config as the healthy nodes.
Repair or replace it
Redeploy the current build, fix the config, or rebuild the node from your standard image. Replacing is usually safer than patching by hand.
Test it directly before re-adding
Run the curl loop above and submit a test form against that node only. Add it back once it matches the healthy ones.
Add a real health check
Point the load balancer health check at a URL that exercises the app (for example a page that touches the database), not just a port check. Set a failure threshold so unhealthy nodes are removed automatically.
Nginx upstream
Use max_fails and fail_timeout on each server line in the upstream block so Nginx stops sending traffic to a failing node. Open source Nginx only reacts to real request failures; active health checks need Nginx Plus or another proxy such as HAProxy.
HAProxy
Add 'option httpchk GET /health' and 'check' on each server line so HAProxy probes the app and removes failing servers.
Cloud load balancer
In AWS, Google Cloud or Azure, open the target group or backend service and set the health check path, interval and unhealthy threshold. The menu names differ by provider.
Managed or multi-server hosting
WordPress itself has no load balancer setting. Ask your host which node is unhealthy and to remove it. Also check that uploads and cache are shared across nodes, since a node with missing files can look broken.
upstream app_pool {
server 10.0.1.11 max_fails=3 fail_timeout=30s;
server 10.0.1.12 max_fails=3 fail_timeout=30s;
server 10.0.1.13 max_fails=3 fail_timeout=30s;
}How to confirm it's fixed
Because the fault was intermittent, one good test proves nothing. Send many requests through the load balancer and check that every one succeeds.
for i in $(seq 1 50); do
curl -s -o /dev/null -w "%{http_code}\n" https://www.example.com/
done | sort | uniq -cYou should see only 200 (or your normal redirect code). Then submit your form several times and confirm each lead arrives in the inbox and CRM. Watch the load balancer's unhealthy-host count for a day.
How to prevent it happening again
- Use application-level health checks with a sensible failure threshold
- Alert when any single node is marked unhealthy
- Deploy to all nodes the same way, from one image or pipeline
- Monitor disk, memory and error rate per node, not only for the pool
- Share uploads, sessions and cache between nodes
- Run repeated end-to-end form tests, not a single check
Day 1
A deploy fails on one node, which keeps the old code.
Day 1
Port check still passes, so the node stays in the pool.
Day 2
Some visitors see errors; most don't, so nobody notices.
Day 5
Lead numbers look lower than expected; staff say 'it works for me'.
Day 6
Node found, drained and rebuilt; health check added.
How FunnelGuard handles this
FunnelGuard detects this only partly. It runs your real journeys (form, checkout, booking or chat button) on a schedule and re-checks any failure from a second region. From those repeated runs it produces a flaky score, which shows when a journey passes some times and fails others. That pattern is the typical sign of one bad node.
What it does not do: FunnelGuard sees your site from the outside, through the load balancer. It does not know which node served a request, does not connect to your servers, and cannot read per-node logs or load balancer health. A scheduled run may also happen to land on healthy nodes and miss the problem, especially on the Free plan with daily checks.
To cover the rest by hand: when a flaky score rises, use the curl loop above to test each backend directly, check the load balancer's target health, and compare logs per node. Set up node-level alerts in your hosting or cloud monitoring.
Questions people ask
Why does my website work sometimes and fail other times?
If your site runs on several servers behind a load balancer, one unhealthy server can cause random failures. Visitors routed to it see errors, while others see a normal site. Test each server directly to find out which one is failing.
How do I find which server behind a load balancer is failing?
Request your site from each backend directly, for example with curl and the --resolve option, and compare status codes, response sizes and timing. The node that differs is the suspect. Then check that node's logs, disk, memory and deployed version.
Why doesn't my load balancer remove the broken server automatically?
Usually the health check is too shallow, such as a simple port or TCP check that passes even when the app returns errors. Point it at an application URL that returns 200 only when the app and database work, and set an unhealthy threshold.
Why do I get random 502 or 503 errors?
A 502 or 503 from a load balancer often means a backend failed to respond or is out of service. If only some requests fail, one node in the pool is the likely cause, though overloaded or restarting servers can do the same.
Can a bad node cause missing conversions in analytics?
Yes. A node running old code or a broken template may serve pages without your tracking tags or with a failing form. Conversions then go missing for only the share of visitors routed to that node.
Can FunnelGuard tell me which server is bad?
No. FunnelGuard tests through your public site and reports a flaky score when a journey passes and fails at different times. It cannot see individual nodes, so you need to check the backends yourself.
How many times should I test to be sure it's fixed?
Send dozens of requests through the load balancer and submit your form several times. With one bad node in three, a single test passes about two times in three, so repeated tests are the only reliable proof.
Related issues
- OPS-089Sticky sessions missing behind load balancerFix guide
- OPS-091Auto-scaling failure during traffic peakFix guide
- OPS-092Hosting migration left old server serving some trafficFix guide
- OPS-072Server out of disk space (uploads, sessions fail)Fix guide
- OPS-073Memory / PHP memory_limit exhausted (white screen)Fix guide
- OPS-094Rate limiting on host blocks normal visitorsFix guide