Home
ArcIn AI
Login Request Demo Free Trial →
Kubernetes root-cause analysis·Nov 23, 2026·6 min read

The 502 nobody could find

How Applicare and its AI assistant ArcIn find a hidden cause of failed customer orders, explain it in plain words, and apply the exact fix in one click.

Arcturus Technologies Nov 23, 2026 6 min read

In short. A small share of customer orders fails at random with an error page. Every dashboard says the system is healthy, so teams usually restart, scale, and blame the network for days. The real cause is two timeout settings, owned by two different teams, that disagree. Applicare joins the evidence no single tool shows, names the cause with the numbers, and ArcIn applies the one-line fix, checks that it worked, and can undo it.

1. What the business sees

An online shop. Most of the time everything works. But every so often a customer clicks Place order and gets "502 Bad Gateway". Clicking again usually works, so most complaints are vague: "the site glitched". In our lab about one order in three failed; in production it is typically far rarer, one in a hundred or one in a thousand, which is exactly why it survives: rare enough to be dismissed as a blip, frequent enough to cost revenue, double-charge risk and trust every day.

2. Why good engineering teams miss it

This is not a careless-team problem. Every signal a team normally checks says "healthy":

What the team checksWhat it shows
The checkout service (restarts, CPU, memory)Healthy
The checkout service's own error logNo errors
Browsing the catalogue100% successful
Load, latency, autoscalingNormal
The front door (ingress) logA few "connection reset" lines among millions of normal ones

The failed orders never reach the checkout service, so it has nothing to report. The usual reactions, restarting it, scaling it up, raising timeouts, adding retries in the client, change nothing. A retried order can even be charged twice.

3. The real cause, in plain words

Between the customer and the checkout service sits the ingress, the cluster's front door. To be fast, it keeps the connection to the checkout service open after each request and reuses it for the next one.

One connection, after the last request 0 s 5 s 60 s Ingress keeps it 60 s "still open - I can reuse it" Checkout keeps it 5 s closed Order at 12 s: sent on a closed connection → reset → 502
Any request that arrives after a pause longer than 5 seconds is sent on a connection the checkout service has already given up. The ingress quietly retries a page view on a new connection, so browsing looks perfect. It never retries an order, because repeating a payment is dangerous, so the customer sees the error.

That single mismatch explains every odd symptom: only orders fail, the failures look random (they depend on pauses between clicks), and the checkout service looks perfectly healthy.

4. Isn't this covered by best practice?

Partly. The rule "the server must keep idle connections longer than the proxy in front of it" is documented by cloud and proxy vendors, and an experienced engineer who already suspects it can confirm it. It still reaches production regularly, for reasons best practice does not remove:

So the value is not in knowing the rule. It is in noticing the problem early, proving which pair is wrong, and fixing it safely.

5. How Applicare finds it

Applicare collects the three pieces of evidence that are normally in three different places, and joins them automatically:

EvidenceWhere it comes fromWhat it proves
Failed orders, page views retried silently, connection resetsThe ingress log, read every minute, per serviceThe failures happen on reused connections, not in the application
The checkout service's keep-alive time (5 s)Its Kubernetes settingsThe service closes connections early
The ingress keep-alive time (60 s)The ingress configurationThe ingress holds them longer, so the two disagree

When all three agree, Applicare opens a single problem card marked Confirmed, with the impact, the cause in plain words and the evidence behind it:

Applicare problem card titled: checkout.edge.lab, POST requests fail with 502 at random, the ingress reuses idle connections edge-demo-checkout already closed. Status Open and Confirmed. The card's impact, cause and evidence: 112 of 328 POST requests (34.1%) failed with 502 in the last 5 minutes; ingress-nginx keeps an idle connection for 60 seconds while the checkout service keeps one for only 5 seconds; nginx retries a GET on a new connection but not a POST.
The Applicare problem card, as it appears in the console (our lab cluster). The fix is shown further down the card.

The card also says what will not help (restarting, scaling, retries), so no time is lost on the usual reactions. Side effects of the same fault, such as a misleading "slow" reading on the service or an error alarm on the ingress, are linked to this one cause instead of competing with it.

6. How ArcIn turns it into one click

ArcIn is the AI assistant built into the Applicare console. Anyone can ask in plain language, without knowing the cluster:

"Why do checkout orders on checkout.edge.lab fail with 502 at random? How do I fix it?"
ArcIn's answer in the console chat, listing impact, cause, evidence and the fix: set upstream-keepalive-timeout to 4 seconds in the ingress-nginx-controller ConfigMap, below the checkout service's 5 seconds.
ArcIn's answer in the console chat: impact, cause, evidence and the exact fix. Here the fix is to set upstream-keepalive-timeout to 4 s in the ingress-nginx ConfigMap, below the checkout service's 5 s, so the ingress closes an idle connection before the service does.
  1. It answers with the cause and the evidence, taken from Applicare's card and confirmed against the live data, usually within a minute or two. It understands that the web address named in the question belongs to the checkout service.
  2. It offers the exact fix as a Run card: one configuration change, shown in full before anything happens.
  3. An administrator presses Run. The change is first checked by Kubernetes without being applied (a "dry run"), then applied through the Applicare agent that already monitors the cluster. No one logs in to a server.
  4. ArcIn verifies the result itself about 90 seconds later: "Fixed, as far as the data shows. The last failure was at 18:31:09 UTC, as the fix took effect; none since."
  5. Undo is one click, and puts back exactly the previous setting. Every run is recorded.
ArcIn Run card after the fix: Succeeded in 61 seconds, the ConfigMap change was dry-run checked and applied, an Undo this change button, and ArcIn's follow-up message: Fixed, as far as the data shows.
After Run: the change was checked, applied and read back on the cluster in about a minute, and ArcIn confirmed that orders stopped failing. "Undo this change" puts the old setting back.

7. Measured in our lab

26 of 113
orders failed before the fix (2 minutes)
0 of 190
orders failed after the fix (4 minutes)
Minutes
from question to verified fix: the answer, a run under a minute, and a check 90 s later

8. What it means for the business

About the demonstration: the shop traffic and the checkout service were simulated on a test Kubernetes cluster. In real systems the timing clash happens occasionally rather than on every quiet connection; the lab makes it frequent so it can be shown within minutes. A network device between the ingress and the service with a short idle timeout (for example a NAT gateway, firewall or cloud load balancer) produces the same symptoms, and the same fix applies. Figures quoted are from our lab runs on 23 November 2026.

Kubernetesingress-nginx502 Bad GatewayRoot Cause AnalysisArcIn AI
← Back to blog Try Applicare free →