<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: upordown.online</title>
    <description>The latest articles on DEV Community by upordown.online (@upordownonline).</description>
    <link>https://dev.to/upordownonline</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4207346%2F6128a48b-a24a-466f-a304-ab19b1655a1e.png</url>
      <title>DEV Community: upordown.online</title>
      <link>https://dev.to/upordownonline</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/upordownonline"/>
    <language>en</language>
    <item>
      <title>Should your public status page list third-party dependencies (payments, email, auth) as their own components? Let's argue about it</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Thu, 03 Dec 2026 09:22:06 +0000</pubDate>
      <link>https://dev.to/upordownonline/should-your-public-status-page-list-third-party-dependencies-payments-email-auth-as-their-own-241a</link>
      <guid>https://dev.to/upordownonline/should-your-public-status-page-list-third-party-dependencies-payments-email-auth-as-their-own-241a</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5174386" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When checkout fails because the payment provider is having a bad morning, you already know about it. Support knows about it. The provider's own status page, eventually, knows about it. The question is whether &lt;em&gt;your&lt;/em&gt; status page should have a row labelled "Payments (Stripe)" or "Sign-in (Auth0)" sitting next to "API" and "Website".&lt;/p&gt;

&lt;p&gt;Some teams treat that row as basic honesty. Others treat it as a leak, a cop-out, or a maintenance burden they will get wrong. Both sides have a point.&lt;/p&gt;

&lt;p&gt;Let's argue about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The case for listing third parties as their own components
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Customers experience one product.&lt;/strong&gt; They do not care that the card form is an iframe on someone else's origin. If they cannot pay, &lt;em&gt;you&lt;/em&gt; are down. A status page that says "All systems operational" while checkout is dead is a lie, even if every VM you own is healthy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A named component is faster than a paragraph.&lt;/strong&gt; "Payments: degraded — we are waiting on our provider" answers the first two support questions (is it us? is it everyone?) without a novel. A single "Website" component that you flip to yellow for five different reasons does not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It sets a boundary for your own SLO.&lt;/strong&gt; If you publish a 99.9% checkout number that includes provider outages, you will miss it on their worst day. If you exclude them in the fine print but hide them on the status page, customers will do the maths themselves, badly. A visible component lets you say: this part is ours, this part is theirs, and here is how we behave when theirs breaks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It forces you to actually monitor them.&lt;/strong&gt; A component you are willing to show the world needs a probe: a test payment, a test login, a test email. Teams that refuse to list a dependency often also do not check it, and learn about the outage from Twitter.&lt;/p&gt;

&lt;h2&gt;
  
  
  The case against putting their name on your page
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;It reads as blame-shifting.&lt;/strong&gt; "Payments (Stripe): major outage" on &lt;em&gt;your&lt;/em&gt; domain, while your marketing site is fine, sounds to a non-technical customer like "not our fault, go away". Some of them will go and complain to the provider. Some of them will decide you picked a bad provider. Some of them will just trust you less. You chose that dependency; you own the moment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It leaks architecture.&lt;/strong&gt; A public list of "Auth0, Stripe, SendGrid, Cloudflare, AWS us-east-1" is a gift to competitors and a starting map for anyone thinking about your attack surface. Even without brand names, a component called "EU identity provider" is more than some companies want on a URL that is crawled and archived.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It goes stale, and stale is worse than absent.&lt;/strong&gt; Providers change status in 20 minutes. If your component is updated by a human, it will lag. If it is updated by scraping their status page, you will inherit their delays, their "investigating" grey area, and the day they mark themselves up while &lt;em&gt;your&lt;/em&gt; integration is still failing (a scoped outage, a single region, a single payment method). A green third-party row next to a broken checkout is a worse lie than no row at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not every dependency deserves a row.&lt;/strong&gt; The CDN, the DNS host, the error tracker, the CI provider, the analytics pixel — you can grow a 25-row page that no longer tells a customer whether they can sign in and pay. The status page stops being a product surface and becomes an org chart.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where I've landed
&lt;/h2&gt;

&lt;p&gt;I want a short public page, and I want it to be true.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;List a third party only if a customer can name the failure without your help.&lt;/strong&gt; Payments, sign-in, and email delivery usually qualify. The queue that builds invoices overnight, the image CDN, the log drain — usually do not. Those stay on an internal page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use a customer-facing name, and be careful with the vendor name.&lt;/strong&gt; "Checkout payments" or "Sign-in" is enough for most products. Adding the vendor can help a technical customer correlate with a known incident, but it is not free. I would add the name for a payment or identity provider that users already see in the UI (the card widget, the "Continue with..." button), and skip it otherwise.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your probe, not their badge, drives the row.&lt;/strong&gt; If a test charge on &lt;em&gt;your&lt;/em&gt; account fails, the component is degraded, even if the provider's page is green. If their page is red and your test charge still works (other regions, other methods), say what &lt;em&gt;your&lt;/em&gt; customers can do, not what the provider's banner says.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The headline still has to make sense.&lt;/strong&gt; If checkout is down, the page is not "All systems operational" with a yellow row halfway down. The current-status banner at the top should match the worst customer-facing component.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A status page that only reflects your own VMs will stay green through the outage your customers actually care about.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5174386" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; can watch the public path that matters — including a checkout or sign-in URL — from outside your network, so you have a signal of your own before you decide what the page should say.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The parts I'm still unsure about
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Partial failures.&lt;/strong&gt; A provider is down for Visa, or for one country, or for 3-D Secure only. Do you mark the whole component degraded, add a sub-component, or write a note and leave the row green? I lean toward degraded plus a sentence, but I have seen teams argue that "degraded" causes more support volume than it saves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Legal and contractual wording.&lt;/strong&gt; Some vendors dislike their name on your incident communications, or your counsel does. That is a real constraint, not a style choice. It should be settled before the incident, not during it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How long a third-party incident stays on the history.&lt;/strong&gt; A year of "Stripe, Stripe, Auth0, Stripe" in your incident list may be honest and also may be a worse advertisement than you want. I would keep the history, and write postmortems that say what &lt;em&gt;you&lt;/em&gt; changed (a fallback, a timeout, a queue) so it does not read as a complaint log.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you only have one component today, called "Website", I would still start by splitting out the money path and the sign-in path, even if you never print a vendor name next to them. The argument about naming the vendor is secondary to the argument about telling the truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-nfconntrack-table-full-dropping-packet-the-linux-connection-tracking-limit-that-4ca3"&gt;How to fix 'nf_conntrack: table full, dropping packet': the Linux connection-tracking limit that makes a site look randomly down&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/should-your-status-page-update-itself-from-your-monitors-or-only-when-a-human-says-so-lets-argue-dlc"&gt;Should your status page update itself from your monitors, or only when a human says so? Let's argue about it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/should-you-report-uptime-from-synthetic-checks-or-from-real-user-traffic-lets-argue-about-it-4937"&gt;Should you report uptime from synthetic checks or from real user traffic? Let's argue about it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/should-your-uptime-checks-run-from-the-same-cloud-region-as-your-servers-or-only-from-the-public-4pma"&gt;Should your uptime checks run from the same cloud region as your servers, or only from the public internet? Let's argue about it&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you put third-party dependencies on the public status page? If you do, do you name the vendor, and who is allowed to flip the row?&lt;/p&gt;

</description>
      <category>monitoring</category>
      <category>devops</category>
      <category>discuss</category>
      <category>sre</category>
    </item>
    <item>
      <title>How to fix 'nf_conntrack: table full, dropping packet': the Linux connection-tracking limit that makes a site look randomly down</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Thu, 03 Dec 2026 09:21:17 +0000</pubDate>
      <link>https://dev.to/upordownonline/how-to-fix-nfconntrack-table-full-dropping-packet-the-linux-connection-tracking-limit-that-4ca3</link>
      <guid>https://dev.to/upordownonline/how-to-fix-nfconntrack-table-full-dropping-packet-the-linux-connection-tracking-limit-that-4ca3</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5174376" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A site that is "down for some people, fine for others, and fine if you retry" is not always a bad ISP or a dead backend. On a busy Linux host — especially a Kubernetes node, a Docker host, or anything doing NAT — it is often the kernel's connection-tracking table filling up. New packets that would create a conntrack entry get dropped. Existing connections may still work. Your homepage check can stay green through the worst of it.&lt;/p&gt;

&lt;p&gt;The kernel is unusually honest about this. It writes a line to the log, and two sysctl values tell you how close you are. This is how to read them, fix the cause, and only then decide whether to raise the limit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Confirm it is conntrack, not a flaky origin
&lt;/h2&gt;

&lt;p&gt;On the host that terminates or NATs the traffic (the node, the gateway, the box running iptables or nftables, not necessarily the app container):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# current entries vs the cap&lt;/span&gt;
sysctl net.netfilter.nf_conntrack_count net.netfilter.nf_conntrack_max

&lt;span class="c"&gt;# the smoking gun, if it is still in the ring buffer&lt;/span&gt;
sudo dmesg -T &lt;span class="o"&gt;|&lt;/span&gt; grep -i conntrack &lt;span class="o"&gt;|&lt;/span&gt; tail
&lt;span class="c"&gt;# or, if you have journald&lt;/span&gt;
sudo journalctl -k -S &lt;span class="s2"&gt;"1 hour ago"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep -i conntrack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The line you want looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nf_conntrack: table full, dropping packet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;nf_conntrack_count&lt;/code&gt; is sitting at or very near &lt;code&gt;nf_conntrack_max&lt;/code&gt;, you have the cause even if the log line has already rotated. If the count is a small fraction of the max, this is not your outage — keep looking (file descriptors, upstream timeouts, a full disk, a dead worker).&lt;/p&gt;

&lt;p&gt;On many hosts the older name &lt;code&gt;net.ipv4.netfilter.ip_conntrack_*&lt;/code&gt; is a symlink or is simply absent. Prefer the &lt;code&gt;nf_conntrack_*&lt;/code&gt; keys. If &lt;code&gt;sysctl&lt;/code&gt; says the key is unknown, the module is not loaded and you are on the wrong machine.&lt;/p&gt;

&lt;p&gt;A quick live count of what is in the table helps too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# if the conntrack tool is installed (conntrack-tools)&lt;/span&gt;
sudo conntrack -C
sudo conntrack -S
&lt;span class="c"&gt;# a rough split by state, no extra packages&lt;/span&gt;
sudo awk &lt;span class="s1"&gt;'{print $4}'&lt;/span&gt; /proc/net/nf_conntrack &lt;span class="o"&gt;|&lt;/span&gt; sort &lt;span class="o"&gt;|&lt;/span&gt; uniq -c &lt;span class="o"&gt;|&lt;/span&gt; sort -nr &lt;span class="o"&gt;|&lt;/span&gt; head
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A pile of &lt;code&gt;TIME_WAIT&lt;/code&gt; or &lt;code&gt;ESTABLISHED&lt;/code&gt; entries is the usual picture. A pile of &lt;code&gt;SYN_SENT&lt;/code&gt; or &lt;code&gt;SYN_RECV&lt;/code&gt; is a different problem (a scan, a flood, or a backend that is not completing handshakes).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a web server hits this
&lt;/h2&gt;

&lt;p&gt;Conntrack is not only for "a firewall appliance". Docker, Kubernetes (kube-proxy in iptables or nftables mode), libvirt, UFW, firewalld, and any &lt;code&gt;iptables -t nat&lt;/code&gt; rule will cause the kernel to track connections. Each tracked flow uses an entry until it times out.&lt;/p&gt;

&lt;p&gt;The default &lt;code&gt;nf_conntrack_max&lt;/code&gt; is often 65,536, or a value derived from RAM at boot. That sounds large until you have a node handling thousands of short HTTP connections a second plus NAT, &lt;code&gt;nf_conntrack_tcp_timeout_established&lt;/code&gt; left at its default of &lt;strong&gt;5 days&lt;/strong&gt;, &lt;code&gt;TIME_WAIT&lt;/code&gt; at 120 seconds with clients that open a new connection for every request, or a mesh that NATs every outbound call.&lt;/p&gt;

&lt;p&gt;The site then fails in a way that looks random: packets that need a new entry are dropped, retries often land on a reused flow, and a one-off &lt;code&gt;curl&lt;/code&gt; from your laptop succeeds.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to change, in order
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Free space in the table, right now, if you are in the incident.&lt;/strong&gt; Restarting a noisy workload, draining a node, or briefly lowering timeouts will drop count faster than a reboot. A reboot also clears the table, and also drops every connection. Prefer not to.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Shorten timeouts that are keeping dead flows around.&lt;/strong&gt; This is the fix that usually matters more than raising the cap:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# how long an idle established TCP flow is remembered (default is often 432000s = 5 days)&lt;/span&gt;
sysctl net.netfilter.nf_conntrack_tcp_timeout_established
&lt;span class="c"&gt;# 1 hour is plenty for most HTTP/TCP services; tune to your longest real idle need&lt;/span&gt;
sudo sysctl -w net.netfilter.nf_conntrack_tcp_timeout_established=3600

&lt;span class="c"&gt;# TIME_WAIT entries (default 120)&lt;/span&gt;
sudo sysctl -w net.netfilter.nf_conntrack_tcp_timeout_time_wait=60
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make those persist in &lt;code&gt;/etc/sysctl.d/99-conntrack.conf&lt;/code&gt;. Do not cut &lt;code&gt;timeout_established&lt;/code&gt; to a few minutes if you have legitimate idle connections (a database pool, a WebSocket, a long poll) that still need a reply after silence. Look at your real idle times first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Raise &lt;code&gt;nf_conntrack_max&lt;/code&gt; only after you know why you hit it.&lt;/strong&gt; Each entry costs memory (on the order of a few hundred bytes). Doubling the cap on a 64k default is usually fine; multiplying it by 20 because a retry loop is leaking flows is how you hide a bug and then run out of RAM.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# example: 256k entries, and buckets roughly max/4&lt;/span&gt;
sudo sysctl -w net.netfilter.nf_conntrack_max=262144
sudo sysctl -w net.netfilter.nf_conntrack_buckets=65536
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you change &lt;code&gt;max&lt;/code&gt; at runtime, also set &lt;code&gt;buckets&lt;/code&gt; so lookups stay cheap. Put both in sysctl.d; some Kubernetes node images or kube-proxy flags will overwrite them at start.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Find the source of the flows.&lt;/strong&gt; Which namespace, which pod, which NAT rule, which client is creating them? &lt;code&gt;conntrack -L&lt;/code&gt; is verbose but filterable. In Kubernetes, a Deployment with a missing timeout, a health check that opens a new connection every second across thousands of pods, or a service that used to be a ClusterIP and is now a NAT-heavy path will show up as one workload owning most of the table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Reduce needless tracking where you can.&lt;/strong&gt; Not every packet has to be tracked. A &lt;code&gt;NOTRACK&lt;/code&gt;/&lt;code&gt;notrack&lt;/code&gt; rule can exempt intra-node health checks; do this carefully, because it is easy to break NAT or a stateful allow rule.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A conntrack drop rarely looks like a clean 502 in every region at once; it looks like a flaky site that your next retry happens to catch.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5174376" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; checks the public URL from outside, on an interval, so a burst of dropped packets becomes a run of failures with timestamps, not a single "works for me" refresh.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What to watch so it does not surprise you again
&lt;/h2&gt;

&lt;p&gt;Alert when &lt;code&gt;nf_conntrack_count / nf_conntrack_max&lt;/code&gt; is over 70 or 80 percent, not when it is already 100 and packets are on the floor. Export both values from node exporters (&lt;code&gt;node_nf_conntrack_entries&lt;/code&gt; and &lt;code&gt;node_nf_conntrack_entries_limit&lt;/code&gt; on many setups). Treat the ratio as the early signal.&lt;/p&gt;

&lt;p&gt;And put the public path on a monitor that is not running on the same node. A checker that shares the table will fail and recover in the same pattern as your users, or, worse, will be one of the flows filling it.&lt;/p&gt;

&lt;p&gt;If you changed timeouts or the cap today, write down why. The next person who sees a "random" outage should find that note before they double the limit again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-too-many-open-files-emfile-before-it-takes-your-site-down-ulimit-systemd-and-the-ijj"&gt;How to fix 'Too many open files' (EMFILE) before it takes your site down: ulimit, systemd and the leak behind it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-tell-whether-an-outage-is-dns-tls-the-proxy-or-the-origin-a-curl-dig-and-openssl-3pjl"&gt;How to tell whether an outage is DNS, TLS, the proxy or the origin (a curl, dig and openssl decision tree)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-errconnectionreset-in-chrome-and-how-to-tell-when-its-your-server-not-the-visitors-10ie"&gt;How to fix ERR_CONNECTION_RESET in Chrome (and how to tell when it's your server, not the visitor's Wi-Fi)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/should-your-public-status-page-list-third-party-dependencies-payments-email-auth-as-their-own-241a"&gt;Should your public status page list third-party dependencies (payments, email, auth) as their own components? Let's argue about it&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have you hit a table-full drop in production? Was it timeouts, a leaked client, or a Kubernetes node that had simply grown past the default cap?&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>networking</category>
      <category>debugging</category>
    </item>
    <item>
      <title>Moving the database to a new host (or a new major version)? A 12-point checklist so the site doesn't look 'up' while every write fails</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Tue, 01 Dec 2026 15:42:10 +0000</pubDate>
      <link>https://dev.to/upordownonline/moving-the-database-to-a-new-host-or-a-new-major-version-a-12-point-checklist-so-the-site-5aoi</link>
      <guid>https://dev.to/upordownonline/moving-the-database-to-a-new-host-or-a-new-major-version-a-12-point-checklist-so-the-site-5aoi</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5160739" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Database moves go well in staging and then surprise you in production, because the app has more connections than you listed: a web pool, a worker pool, a reporting user, a cron job with a hardcoded host, a forgotten BI tool, a serverless function with its own secret. During the window it is common for reads to work and writes to fail, which is exactly the shape of "the site looks up, and nobody can do anything".&lt;/p&gt;

&lt;p&gt;This is the checklist I want next to the runbook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before the cut
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Inventory every client, not every "service".&lt;/strong&gt; Grep for the hostname, the old IP, the connection string env vars, and the secrets manager keys. Include one-off scripts, &lt;code&gt;psql&lt;/code&gt; in cron, migrations that run in CI against production, and serverless functions that only run on a schedule. Write the list down. Anything not on it will be the thing that breaks at 02:00.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Measure the real cutover window.&lt;/strong&gt; How long to promote a replica, how long for DNS or a proxy to move, how long for clients to drop idle connections (many pools hold a connection for minutes). Your announced window should be that number plus a margin, not the time the failover command itself takes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Decide read-only vs hard cut.&lt;/strong&gt; A period where the old primary is read-only and the app refuses writes with a clear error is kinder than a hard close that surfaces as 500s. If you cannot do read-only, have a maintenance page for the paths that write.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Check versions, extensions and parameters.&lt;/strong&gt; A major upgrade is a different project from a host move. Extensions (&lt;code&gt;uuid-ossp&lt;/code&gt;, &lt;code&gt;pg_stat_statements&lt;/code&gt;, &lt;code&gt;citext&lt;/code&gt;, PostGIS), &lt;code&gt;search_path&lt;/code&gt;, time zone, locale, &lt;code&gt;max_connections&lt;/code&gt;, and disk size on the new host have all caused "it's up but every query fails" cutovers. Dump &lt;code&gt;SELECT extname, extversion FROM pg_extension;&lt;/code&gt; and the relevant GUCs from production, and compare.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Rehearse with a copy of production traffic if you can.&lt;/strong&gt; At least: run the app's boot, a login, a write, a background job, and a migration against a restored copy of the new host. Time the restore and the promote.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Plan how secrets change, and when processes load them.&lt;/strong&gt; A new hostname in a secrets manager does nothing until every process is restarted or can reload. Some pools resolve DNS only at start; they will hold the old IP after a clean DNS cut. Schedule the bounce, or use a proxy (PgBouncer, RDS proxy) whose name stays stable.&lt;/p&gt;

&lt;h2&gt;
  
  
  During the cut
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;7. Stop writers in a controlled order.&lt;/strong&gt; Pause schedulers and workers first, then put the app into a mode that doesn't take payments or sign-ups, then promote or cut. The other order (promote first, then hunt for leftover writers on the old primary) is how you split-brain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Cut, then verify a write from the public path.&lt;/strong&gt; Not &lt;code&gt;psql&lt;/code&gt; from a bastion. Sign up, place a test order, or update a record through the same URL customers use, and read it back. Confirm it landed on the new host (&lt;code&gt;inet_server_addr()&lt;/code&gt;, a canary row, a new sequence range).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. Watch connection errors and idle-in-transaction, not just CPU.&lt;/strong&gt; After the cut you should see old connections drop and new ones appear on the new host. If the web pool is fine and the worker pool is still on the old host, you will ship the homepage and fail every email, invoice or webhook.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A cutover can leave the homepage green and the money path dead, especially if a page is cached or served from a replica.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5160739" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; can watch a path that has to write — login, signup, or a synthetic checkout — from outside, so a database move that only half-completed is an alert, not a quiet pile of 500s on POST.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;10. Keep the old primary up, read-only, until you are sure.&lt;/strong&gt; Do not destroy it in the same change window. If you have to revert, you want it there. Block writes so a forgotten client cannot silently add data you will never see again.&lt;/p&gt;

&lt;h2&gt;
  
  
  After the cut
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;11. Hunt leftover clients for at least one business cycle.&lt;/strong&gt; The weekly report, the Monday billing job, the partner feed at 05:00: they will be the ones still pointing at the old name. Log connections on the old host; anything that still arrives is a missed item from step 1.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12. Leave monitors pointing at the public app, and add one check that writes (or at least that talks to the primary).&lt;/strong&gt; A &lt;code&gt;SELECT 1&lt;/code&gt; against a replica, or a homepage check, will stay green through a failed primary cut. A synthetic that logs in or hits an endpoint which does &lt;code&gt;INSERT ... RETURNING&lt;/code&gt; will not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other traps that show up on the night
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Certificate and SSL mode.&lt;/strong&gt; The new host has a different hostname; clients with &lt;code&gt;sslmode=verify-full&lt;/code&gt; will refuse to connect until the CA and the name match.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;search_path&lt;/code&gt; and default privileges.&lt;/strong&gt; A restore can look complete while the app user cannot see the tables it used to own.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sequence drift&lt;/strong&gt; if you failed back and forth. Check them before you reopen writes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connection limits.&lt;/strong&gt; The new instance, or the proxy in front of it, may have a lower &lt;code&gt;max_connections&lt;/code&gt; than the sum of your pools.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do the inventory and the rehearsal even if the move "is just a promote". The promote is the easy part.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-503-service-unavailable-is-it-your-app-the-proxy-kubernetes-or-a-maintenance-page-3k12"&gt;How to fix 503 Service Unavailable: is it your app, the proxy, Kubernetes, or a maintenance page you forgot to remove?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/failing-over-to-a-backup-region-or-origin-a-12-point-checklist-so-dns-tls-and-sessions-actually-4eb1"&gt;Failing over to a backup region or origin? A 12-point checklist so DNS, TLS and sessions actually survive&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/blue-green-vs-canary-vs-rolling-deploys-what-each-one-protects-you-from-and-what-it-doesnt-237m"&gt;Blue-green vs canary vs rolling deploys: what each one protects you from (and what it doesn't)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/case-study-hypothetical-redis-ran-out-of-memory-the-homepage-still-returned-200-and-checkout-1e4e"&gt;Case study (hypothetical): Redis ran out of memory, the homepage still returned 200, and checkout failed silently for 90 minutes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What was the leftover client that showed up after your last database move — a cron job, a worker, or something you didn't know existed?&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>devops</category>
      <category>sre</category>
      <category>database</category>
    </item>
    <item>
      <title>How to fix 503 Service Unavailable: is it your app, the proxy, Kubernetes, or a maintenance page you forgot to remove?</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Tue, 01 Dec 2026 15:41:36 +0000</pubDate>
      <link>https://dev.to/upordownonline/how-to-fix-503-service-unavailable-is-it-your-app-the-proxy-kubernetes-or-a-maintenance-page-3k12</link>
      <guid>https://dev.to/upordownonline/how-to-fix-503-service-unavailable-is-it-your-app-the-proxy-kubernetes-or-a-maintenance-page-3k12</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5160729" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A 503 Service Unavailable is a &lt;em&gt;deliberate&lt;/em&gt; "I can't handle this right now" from some hop in the path. That is different from a 502 (the proxy tried a backend and got garbage) and from a 504 (the proxy waited too long). The 503 is often the most fixable of the three, once you know who issued it. It is also the one most often left on after a maintenance window.&lt;/p&gt;

&lt;p&gt;Here is how to find the source and what to do for each common cause.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who returned the 503?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sS -D- -o /tmp/body --max-time 20 https://example.com/path-that-fails
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The body and headers are more useful than the status alone:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;nginx&lt;/strong&gt; default 503 is a short plain-text or HTML page and usually &lt;code&gt;Server: nginx&lt;/code&gt;. In the error log you will often see &lt;code&gt;no live upstreams&lt;/code&gt; or &lt;code&gt;upstream prematurely closed connection&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS ALB&lt;/strong&gt; returns a 503 when there are no healthy targets, with &lt;code&gt;Server: awselb/2.0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloudflare&lt;/strong&gt; 503 can be an origin 503 passed through, or Cloudflare itself (overload, or a challenge that went wrong). A &lt;code&gt;cf-ray&lt;/code&gt; plus an error code in the body helps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your app&lt;/strong&gt; may render a branded "we'll be back" page with a 503, or a framework default.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A WAF or API gateway&lt;/strong&gt; may 503 (or 429) on a rule. Look for a request id header.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have access logs at more than one hop, compare. A 200 in the app log and a 503 at the load balancer means the balancer didn't like the target health, not that the app failed the request you are looking at.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cause 1: no healthy backends
&lt;/h2&gt;

&lt;p&gt;This is the classic 503. The proxy wants to forward the request and has nobody to send it to.&lt;/p&gt;

&lt;p&gt;Check the pool, not just one host:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# systemd / a single app&lt;/span&gt;
systemctl is-active myapp
&lt;span class="c"&gt;# Kubernetes&lt;/span&gt;
kubectl get pods -l &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;myapp
kubectl get endpointslices -l &lt;span class="nv"&gt;app&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;myapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A pod can be &lt;code&gt;Running&lt;/code&gt; and still not in the Service endpoints if the readiness probe is failing. That is the most common Kubernetes 503 I see: a probe that started failing after a deploy (wrong path, slower boot, a dependency the probe now needs), the Service empties out, the ingress returns 503, and the app logs look quiet because they are not receiving traffic.&lt;/p&gt;

&lt;p&gt;On an ALB or nginx upstream, look at target health and at the health check URL. A health check that points at a missing path, or that requires a cookie, will mark every instance unhealthy and 503 the site, while &lt;code&gt;curl&lt;/code&gt; to a node from a bastion still works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; restore at least one healthy target first (roll back, fix the probe, start the process). Then fix why they all left the pool at once. Do not lower the health check until it is meaningless just to get a green box; you will hide the next outage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cause 2: a drain or a deploy
&lt;/h2&gt;

&lt;p&gt;During a rolling deploy or a server shutdown, instances are supposed to leave the pool, finish in-flight work, then die. If the new instances are slow to become ready, or if the deploy takes all replicas down before any are up, the pool is empty for a while and everyone gets 503.&lt;/p&gt;

&lt;p&gt;Look at the deploy timeline against the 503s. If they line up:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Give new instances more time to pass readiness before old ones are removed (&lt;code&gt;minReadySeconds&lt;/code&gt;, a longer pre-stop, a surge of extra replicas).&lt;/li&gt;
&lt;li&gt;Make sure the pre-stop hook &lt;em&gt;stops accepting new work&lt;/em&gt; and still lets the health check fail, so the proxy stops sending traffic before the process exits.&lt;/li&gt;
&lt;li&gt;Don't run a migration that locks the database in the same window, or every new replica will fail readiness together.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cause 3: a maintenance page left on
&lt;/h2&gt;

&lt;p&gt;Many teams flip a flag, an nginx &lt;code&gt;return 503&lt;/code&gt;, a CDN worker, or a feature toggle to serve "we'll be back at 06:00". The work finishes, the homepage is restored, and a more specific path — &lt;code&gt;/login&lt;/code&gt;, &lt;code&gt;/api&lt;/code&gt;, a regional name — stays on the 503. Or the flag is in Redis and survives the deploy that was supposed to clear it.&lt;/p&gt;

&lt;p&gt;Search for the maintenance string in the response body and in your config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -R &lt;span class="s2"&gt;"we'll be back\|maintenance_mode\|return 503"&lt;/span&gt; nginx/ app/ config/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Confirm with curl on each important hostname, not just &lt;code&gt;/&lt;/code&gt;. Then put a calendar reminder, or better, a monitor on the public path, so a leftover 503 is an alert and not a Monday-morning Slack thread.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A 503 on purpose and a 503 by accident look the same to a visitor, and both should be visible from outside.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5160729" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; checks the public URL from outside your infrastructure, so a maintenance flag you forgot to clear, or a pool with no healthy targets, becomes an alert instead of a quiet empty site.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Cause 4: overload and rate limits
&lt;/h2&gt;

&lt;p&gt;Some proxies return 503 when a queue is full or a rate limit is hit (others use 429). If the 503s spike with traffic, look at worker counts, database connections, and gateway quotas. Adding retries from the client without a backoff will make this worse. Shed load on a cheap path, or queue the expensive work, rather than raising limits blindly.&lt;/p&gt;

&lt;h2&gt;
  
  
  A short order to work in
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Read the 503 body and headers; decide which hop issued it.&lt;/li&gt;
&lt;li&gt;Check whether any backends are healthy in that hop's pool.&lt;/li&gt;
&lt;li&gt;If the pool is empty, find out why (readiness, crash, drain, health check URL).&lt;/li&gt;
&lt;li&gt;If the pool is healthy, look for a maintenance flag, a path-specific 503, or a rate limit.&lt;/li&gt;
&lt;li&gt;Confirm recovery from outside, on the same URL a customer uses.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A 503 is often the system doing something explainable. The failure is usually that nobody is looking at the explanation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-502-bad-gateway-in-nginx-find-the-error-log-line-that-tells-you-why-1a7h"&gt;How to fix 502 Bad Gateway in Nginx: find the error log line that tells you why&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-504-gateway-timeout-find-whether-its-nginx-the-load-balancer-cloudflare-or-a-slow-1e28"&gt;How to fix 504 Gateway Timeout: find whether it's nginx, the load balancer, Cloudflare, or a slow origin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/should-a-failed-health-check-restart-the-service-automatically-or-page-a-human-first-lets-argue-53pl"&gt;Should a failed health check restart the service automatically, or page a human first? Let's argue about it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/moving-the-database-to-a-new-host-or-a-new-major-version-a-12-point-checklist-so-the-site-5aoi"&gt;Moving the database to a new host (or a new major version)? A 12-point checklist so the site doesn't look 'up' while every write fails&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What's the most embarrassing 503 you've shipped — a leftover maintenance page, a readiness probe, or something else?&lt;/p&gt;

</description>
      <category>nginx</category>
      <category>kubernetes</category>
      <category>devops</category>
      <category>debugging</category>
    </item>
    <item>
      <title>Should you report uptime from synthetic checks or from real user traffic? Let's argue about it</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Sun, 29 Nov 2026 10:16:22 +0000</pubDate>
      <link>https://dev.to/upordownonline/should-you-report-uptime-from-synthetic-checks-or-from-real-user-traffic-lets-argue-about-it-4937</link>
      <guid>https://dev.to/upordownonline/should-you-report-uptime-from-synthetic-checks-or-from-real-user-traffic-lets-argue-about-it-4937</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5143834" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are two honest ways to say whether a site was up. One is to ask it, on a schedule, from places you control: a synthetic check. The other is to look at what happened to real browsers and apps: success rate, errors, time to first byte, failed checkouts.&lt;/p&gt;

&lt;p&gt;They disagree more often than teams expect, and when they do, someone has to decide which number goes on the status page and which alert is allowed to wake a person up.&lt;/p&gt;

&lt;p&gt;Let's argue about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The case for synthetics
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;You can define the question.&lt;/strong&gt; A check that hits &lt;code&gt;/health/ready&lt;/code&gt; or a scripted checkout every minute from two networks is a repeatable experiment. You know the payload, the location, the timeout, the TLS requirements. That makes it a fair input to an SLA and a fair thing to page on.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real user data is missing when you need it most.&lt;/strong&gt; A total DNS failure produces &lt;em&gt;no&lt;/em&gt; page views, &lt;em&gt;no&lt;/em&gt; RUM beacons, &lt;em&gt;no&lt;/em&gt; client errors, because no page loaded far enough to send them. Synthetic checks fail loudly in exactly that case. An uptime number built only from users who arrived will look fine for an outage that kept almost everyone away.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RUM is a noisy pager.&lt;/strong&gt; A 2% JavaScript error rate can be a real bug, an ad blocker, a browser extension, a bot, or a single enterprise proxy. Paging on "real user success dropped" without a lot of filtering is how on-call starts ignoring the queue.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Synthetics work for the parts of the system users don't open every minute.&lt;/strong&gt; A billing portal used once a month can be hard-down for a day and barely show up in RUM. A check still finds it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The case for real user traffic
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Synthetics are a sample of one path.&lt;/strong&gt; They don't log in as every plan type, from every country, on every ISP, with every feature flag. The IPv6-only failure, the broken checkout for one card brand, the region where the CDN is having a bad morning: RUM sees those. A homepage check does not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Users experience the whole page, not a status code.&lt;/strong&gt; A 200 that takes 20 seconds, a 200 with a JS exception that stops the pay button, a 200 that is yesterday's cached error page — synthetics that only look at HTTP status will call these up. Real users will not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The SLA you care about is the customer one.&lt;/strong&gt; If 8% of checkouts failed and your synthetic stayed green, arguing that uptime was 100% is legally convenient and practically false. A number that can be green while people cannot pay is the wrong number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You already have the data&lt;/strong&gt;, or you can: HTTP access logs, payment-provider dashboards, client-side error rates, "orders per minute". Pretending the only signal is the probe you set up in 2021 wastes it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where I've landed
&lt;/h2&gt;

&lt;p&gt;I want synthetics to &lt;em&gt;page&lt;/em&gt;, and I want real user data to &lt;em&gt;define the truth after the fact&lt;/em&gt; and to catch the incidents synthetics will never see.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pages come from synthetics&lt;/strong&gt;, on the important paths, from outside, with tight, tested rules. They are boring and reliable. That is a feature.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The weekly uptime you share with the team includes at least one user-based number&lt;/strong&gt;: checkout success, API success from clients, or "percentage of real sessions with a hard failure". When that number and the synthetic number disagree, you investigate, you don't average them and move on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A drop in a business metric can page&lt;/strong&gt;, but only after you have a baseline and a filter for known noise. "Orders per minute fell off a cliff at 18:40" is an excellent page. "JS error rate ticked from 0.8% to 1.1%" is not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never drop the synthetic just because you added RUM.&lt;/strong&gt; The first time DNS dies you will remember why.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Synthetics won't see every failure, but they will see the one where no user could reach you at all.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5143834" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; checks the public path from outside your infrastructure, so a complete outage is an alert, not a mysterious hole in your analytics.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The parts I'm still unsure about
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What goes on the public status page.&lt;/strong&gt; Customers deserve something that matches their experience, but a status page driven by raw RUM will flap. I lean toward synthetics for the green/yellow/red, plus a honest sentence when you know a subset of users is affected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How good a scripted checkout has to be&lt;/strong&gt; before you can claim the synthetic covers the money path. A check that stops before payment still misses the 3-D Secure failure. A check that pays in production has other costs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bots.&lt;/strong&gt; If you compute success rate from access logs, you have to keep bots out, or a crawl will become your uptime.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I would not do
&lt;/h2&gt;

&lt;p&gt;I would not average the two numbers into one "combined uptime" and put that on a status page. A synthetic 100% and a checkout success rate of 92% is not "96% uptime". It is "our probe missed a real failure", and the honest report is the 92% plus a sentence about what the probe didn't cover. Combining them hides the disagreement, which is the only useful part.&lt;/p&gt;

&lt;p&gt;I would also not page on a raw RUM "availability" chart from a vendor, with default thresholds, on day one. Those charts almost always include bots, one-off client bugs, and regions you don't serve. Spend a quiet month looking at them next to incidents you already know about, then decide what is page-worthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quick experiment
&lt;/h2&gt;

&lt;p&gt;For the last month, compute two numbers: the synthetic availability you already report, and the share of real checkouts or sign-ups that succeeded. If they match, your checks are in the right place. If they don't, the gap is the argument. Pick one incident in that gap and add a synthetic, or a filtered RUM alert, that would have fired. One is enough to start.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-tell-whether-an-outage-is-dns-tls-the-proxy-or-the-origin-a-curl-dig-and-openssl-3pjl"&gt;How to tell whether an outage is DNS, TLS, the proxy or the origin (a curl, dig and openssl decision tree)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/should-planned-maintenance-count-against-your-uptime-number-lets-argue-about-it-598a"&gt;Should planned maintenance count against your uptime number? Let's argue about it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/should-your-uptime-checks-run-from-the-same-cloud-region-as-your-servers-or-only-from-the-public-4pma"&gt;Should your uptime checks run from the same cloud region as your servers, or only from the public internet? Let's argue about it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/30-seconds-1-minute-or-5-minutes-comparing-uptime-check-intervals-with-a-simulation-you-can-run-2o35"&gt;30 seconds, 1 minute or 5 minutes? Comparing uptime check intervals with a simulation you can run&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Which number do you trust when they disagree, and has a real-user dip ever been your first sign of an incident?&lt;/p&gt;

</description>
      <category>monitoring</category>
      <category>sre</category>
      <category>devops</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How to tell whether an outage is DNS, TLS, the proxy or the origin (a curl, dig and openssl decision tree)</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Sun, 29 Nov 2026 10:15:48 +0000</pubDate>
      <link>https://dev.to/upordownonline/how-to-tell-whether-an-outage-is-dns-tls-the-proxy-or-the-origin-a-curl-dig-and-openssl-3pjl</link>
      <guid>https://dev.to/upordownonline/how-to-tell-whether-an-outage-is-dns-tls-the-proxy-or-the-origin-a-curl-dig-and-openssl-3pjl</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5143831" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The first ten minutes of an outage are often spent in the wrong place: restarting an app that is healthy, or tailing nginx while the real problem is a DNS record that started pointing at nothing. A few commands, in a fixed order, tell you which layer failed. After that you know which log, which dashboard and which person to involve.&lt;/p&gt;

&lt;p&gt;Run these from a network that is &lt;em&gt;not&lt;/em&gt; the same VPC as the origin, ideally the same kind of network a customer is on. A bastion host in the app's subnet will hide public DNS and TLS problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Does the name resolve?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +short example.com A
dig +short example.com AAAA
dig +short www.example.com A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also try a public resolver, so you are not looking only at a cached office answer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +short @1.1.1.1 example.com A
dig +short @8.8.8.8 example.com A
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;No answer, or NXDOMAIN, or a SERVFAIL.&lt;/strong&gt; This is DNS. Check the registrar, the nameservers, recent record edits, and TTL. If some resolvers have the new address and some have the old, you are mid-propagation or a recursive resolver is holding a stale cache. If only the AAAA is wrong, you have an IPv6-shaped outage: some visitors fail, some don't, and a v4-only monitor stays green.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The address is unexpected.&lt;/strong&gt; Compare it to what you think is current (a runbook, a Terraform output, last week's note). A typo, a leftover failover, or a wildcard catching a name you didn't intend is more common than a compromised account, but both look like "the site is gone".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The address is right.&lt;/strong&gt; Move on. Do not start the DNS debug ritual because the homepage is 500.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Does anything accept a TCP connection?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nc -vz -w 5 203.0.113.10 443
&lt;span class="c"&gt;# or&lt;/span&gt;
curl -sS -o /dev/null --connect-timeout 5 https://example.com/ --connect-only
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Connection refused.&lt;/strong&gt; Something is listening on the wrong port, the process is down, or a security group / firewall is rejecting you. This is often the origin or the load balancer, not DNS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connection timed out.&lt;/strong&gt; A firewall drop, a blackholed route, or a host that is down and not refusing. Compare from another network. If it works from the office VPN but not from a phone off Wi-Fi, think WAF, geo rules, or ISP routing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect works.&lt;/strong&gt; Move on to TLS.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Does TLS complete, with the name you asked for?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; openssl s_client -servername example.com -connect example.com:443 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null &lt;span class="o"&gt;|&lt;/span&gt; openssl x509 -noout -dates -subject -ext subjectAltName
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or, more readably with curl:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sSvI https://example.com/ -o /dev/null --max-time 15
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for the handshake errors first, not the HTTP status.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Certificate expired, or not yet valid.&lt;/strong&gt; The name is fine; the cert is not. Check the dates, then who was supposed to renew it (Let's Encrypt cron, a load-balancer integration, a human).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Name mismatch / no SAN for this host.&lt;/strong&gt; Traffic is hitting a default cert, a stale cert for &lt;code&gt;staging.&lt;/code&gt;, or the wrong vhost. Common after a new hostname or a failover.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protocol or cipher mismatch.&lt;/strong&gt; An old TLS-only-1.0 origin, or an origin that only speaks HTTP on 443. &lt;code&gt;curl -v&lt;/code&gt; will say.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Handshake hangs.&lt;/strong&gt; Middleboxes, a broken TLS offloader, or an origin that accepts TCP and then never replies. Distinct from an HTTP timeout.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to skip DNS and test a specific origin:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sSvI --resolve example.com:443:203.0.113.10 https://example.com/ -o /dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If &lt;code&gt;--resolve&lt;/code&gt; works and the public name doesn't, you are back at DNS or routing. If both fail the same way, the origin or the proxy is the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. What HTTP status comes back, and from whom?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sS -D- -o /tmp/body --max-time 30 https://example.com/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read the status line, &lt;code&gt;server&lt;/code&gt;, &lt;code&gt;via&lt;/code&gt;, &lt;code&gt;x-cache&lt;/code&gt;, &lt;code&gt;cf-ray&lt;/code&gt;, and the first bytes of the body.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;5xx from the proxy&lt;/strong&gt; (&lt;code&gt;504&lt;/code&gt;, &lt;code&gt;502&lt;/code&gt;, &lt;code&gt;503&lt;/code&gt;, Cloudflare 52x). The front door is up; the thing behind it is slow, down, or refusing. Go to the proxy error log, not the app's "it looks fine to me" dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;5xx from the app&lt;/strong&gt; (often a stack trace, a framework error page, or your own branded 500). The origin is reachable and failing. Go to the app logs and the database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3xx to a dead place.&lt;/strong&gt; DNS and TLS can be fine while a redirect sends everyone to an old hostname that is expired, parked, or 404. Follow it with &lt;code&gt;curl -sSI&lt;/code&gt; and then with &lt;code&gt;-L&lt;/code&gt; separately so you see each hop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;200 with the wrong content.&lt;/strong&gt; A maintenance page, a CDN stale cache, a default site on the load balancer, an empty SPA shell. Status alone is not health.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A decision tree only helps if you run it from the same kind of network your visitors use.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5143831" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; checks the public name from outside your infrastructure, so the DNS, TLS and HTTP failure you would have found with this tree can be an alert with a time, instead of a guess after the tweets start.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  5. Put it in a 60-second order
&lt;/h2&gt;

&lt;p&gt;When the room is noisy, I run it in this order and I stop at the first failure:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;dig&lt;/code&gt; the public name at 1.1.1.1 and 8.8.8.8. Wrong or empty? DNS.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;curl -svI --max-time 15&lt;/code&gt; the public HTTPS URL. Handshake error? TLS. Connect timeout or refused? Network, firewall, or nothing listening.&lt;/li&gt;
&lt;li&gt;Read the HTTP status and &lt;code&gt;server&lt;/code&gt; header. Proxy 5xx? Proxy logs. App 5xx? App logs. Redirect? Follow the chain.&lt;/li&gt;
&lt;li&gt;Only then SSH to a box.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The habit that wastes the most time is starting at step 4 because SSH is already open.&lt;/p&gt;

&lt;h2&gt;
  
  
  A note on monitors
&lt;/h2&gt;

&lt;p&gt;A good external check already does steps 1–3 for you, if it uses the public hostname, validates TLS, and records the error class (DNS, TLS, connect, timeout, HTTP status). When the alert says "TLS handshake failed", do not start with the app log. When it says "502", do. The decision tree is what you want the monitor to have run before it pages you; it is also what you run to confirm the monitor is right.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/is-it-down-or-is-it-me-debugging-a-site-that-wont-load-one-layer-at-a-time-deh"&gt;Is it down, or is it me? Debugging a site that won't load, one layer at a time&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-read-curl-v-output-to-find-where-a-request-fails-49nh"&gt;How to read curl -v output to find where a request fails&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-504-gateway-timeout-find-whether-its-nginx-the-load-balancer-cloudflare-or-a-slow-1e28"&gt;How to fix 504 Gateway Timeout: find whether it's nginx, the load balancer, Cloudflare, or a slow origin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/should-you-report-uptime-from-synthetic-checks-or-from-real-user-traffic-lets-argue-about-it-4937"&gt;Should you report uptime from synthetic checks or from real user traffic? Let's argue about it&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When was the last time you restarted an app that wasn't the problem? Which step of this tree would have told you sooner?&lt;/p&gt;

</description>
      <category>dns</category>
      <category>devops</category>
      <category>debugging</category>
      <category>linux</category>
    </item>
    <item>
      <title>Case study (hypothetical): Redis ran out of memory, the homepage still returned 200, and checkout failed silently for 90 minutes</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Fri, 27 Nov 2026 10:41:36 +0000</pubDate>
      <link>https://dev.to/upordownonline/case-study-hypothetical-redis-ran-out-of-memory-the-homepage-still-returned-200-and-checkout-1e4e</link>
      <guid>https://dev.to/upordownonline/case-study-hypothetical-redis-ran-out-of-memory-the-homepage-still-returned-200-and-checkout-1e4e</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5132002" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is a hypothetical case study. The company and numbers are invented; the failure is a common one: the page you monitor stays up while the dependency the money path needs is dying.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;An online store, about 15,000 orders a day, runs a Rails app behind nginx and an AWS load balancer. Sessions and the cart live in ElastiCache Redis. The product catalogue is in Postgres and is also cached in Redis. The homepage, category pages and the &lt;code&gt;/health&lt;/code&gt; endpoint do not need a session. Checkout does.&lt;/p&gt;

&lt;p&gt;Uptime checks hit &lt;code&gt;https://www.example.com/&lt;/code&gt; and &lt;code&gt;https://www.example.com/health&lt;/code&gt; every minute from two regions. Both have to return 200 in under 5 seconds. They have been green for months.&lt;/p&gt;

&lt;p&gt;Redis was sized for last year's peak. &lt;code&gt;maxmemory-policy&lt;/code&gt; is &lt;code&gt;allkeys-lru&lt;/code&gt;. Nobody is paged on Redis memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  The incident
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Friday, 18:40.&lt;/strong&gt; A marketing campaign lands. Traffic to a handful of product pages jumps. The catalogue cache fills Redis with new keys. Evictions start.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;18:47.&lt;/strong&gt; Session keys start getting evicted along with cache keys. Customers who already had a cart see an empty cart, or are bounced to login and then back to an empty cart. New checkout attempts create a session, put a cart in Redis, and lose it on the next request if the key was evicted. The checkout form posts, the server can't find the cart, and the app renders the cart page again with a generic "something went wrong, try again". The HTTP status is 200.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;18:40–20:10.&lt;/strong&gt; The homepage is fast and 200. &lt;code&gt;/health&lt;/code&gt; pings Postgres and returns 200. It does not ping Redis. The load balancer is happy. The uptime monitors are happy. Support gets 30 chats in 20 minutes: "I can't pay", "my cart emptied itself", "the place order button does nothing".&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;20:10.&lt;/strong&gt; An engineer on-call for a different service looks at a support-escalation Slack message, opens Redis metrics, and sees memory at the cap and evictions in the tens of thousands per minute. They fail closed: scale the Redis node up, and temporarily point the catalogue cache at a second database so sessions stop competing with product HTML.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;20:25.&lt;/strong&gt; Checkout starts completing again. About 90 minutes of the evening campaign's traffic had a store that looked open and would not take money.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixing the immediate damage
&lt;/h2&gt;

&lt;p&gt;They kept the larger Redis node, split cache and sessions into two instances so a catalogue stampede couldn't evict sessions, and refunded or honoured the handful of duplicate orders from people who retried after the fix. They emailed customers who had started checkout and not finished during the window, with a direct link and a short explanation.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A homepage 200 is not a working store.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5132002" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; can watch the real checkout path from outside, with a timeout, and alert when that path stops completing, even if the homepage and the health endpoint stay green.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What actually went wrong
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The monitors measured the wrong path.&lt;/strong&gt; The homepage and &lt;code&gt;/health&lt;/code&gt; were chosen because they were cheap and stable. They do not exercise Redis, sessions, or the payment form. They cannot fail in the way checkout failed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;/health&lt;/code&gt; was a liveness check pretending to be a readiness check.&lt;/strong&gt; It answered "is this process up?", which is what the load balancer needed. It was also used as the public proof that the site worked. Those should not have been the same endpoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Redis was a single shared bag of keys.&lt;/strong&gt; Sessions, carts and a large catalogue cache competed under &lt;code&gt;allkeys-lru&lt;/code&gt;. The cache was doing its job — filling with hot product pages — and evicting the keys the business actually needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The checkout error was a 200.&lt;/strong&gt; Nothing in the access log looked like an outage: no spike of 5xx, no rise in latency on &lt;code&gt;/&lt;/code&gt;. The useful signal was "orders per minute", and nobody was looking at it on a Friday evening.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fixes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Split Redis by purpose.&lt;/strong&gt; One instance for sessions and carts (&lt;code&gt;volatile-lru&lt;/code&gt; or no eviction, with explicit TTLs). One for the catalogue cache, allowed to evict. Memory alerts on both, with a page if evictions happen on the session instance at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Change &lt;code&gt;/health&lt;/code&gt; into two endpoints.&lt;/strong&gt; &lt;code&gt;/health/live&lt;/code&gt; stays cheap, for the load balancer. &lt;code&gt;/health/ready&lt;/code&gt; checks Postgres &lt;em&gt;and&lt;/em&gt; a Redis &lt;code&gt;PING&lt;/code&gt; plus a short set/get on the session instance. The load balancer can keep using live; humans and monitors use ready.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Add a synthetic checkout check.&lt;/strong&gt; A monitor, from outside, adds a known item, starts checkout, and stops before paying (or pays in a sandbox). It must fail if the cart vanishes or the form returns the "try again" page with a 200. Status is not enough; the body and the sequence matter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Alert on business metrics.&lt;/strong&gt; Orders per minute, checkout-start to checkout-complete ratio, payment-provider errors. A drop below a quiet-Friday baseline should page even if every HTTP check is green.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Treat eviction as an incident on the session store.&lt;/strong&gt; A cache hitting &lt;code&gt;maxmemory&lt;/code&gt; is normal. A session store hitting it is an outage in progress.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd take from it
&lt;/h2&gt;

&lt;p&gt;If the money path needs a dependency, a monitor that never touches that dependency will be green for the whole incident. Health endpoints that avoid "expensive" checks become expensive in a different way: they hide the failure. And HTTP status on a marketing page is a poor proxy for "customers can pay".&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/failing-over-to-a-backup-region-or-origin-a-12-point-checklist-so-dns-tls-and-sessions-actually-4eb1"&gt;Failing over to a backup region or origin? A 12-point checklist so DNS, TLS and sessions actually survive&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/stop-monitoring-your-homepage-monitor-the-path-that-makes-you-money-104o"&gt;Stop monitoring your homepage. Monitor the path that makes you money.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/your-health-check-returns-200-while-users-get-errors-7-health-check-mistakes-d84"&gt;Your health check returns 200 while users get errors: 7 health check mistakes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/case-study-hypothetical-the-payment-providers-status-page-said-operational-while-our-checkout-54e4"&gt;Case study (hypothetical): the payment provider's status page said 'operational' while our checkout timed out for 40 minutes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have you had an outage where the homepage never went down? What was the dependency, and how do you check it now?&lt;/p&gt;

</description>
      <category>redis</category>
      <category>devops</category>
      <category>monitoring</category>
      <category>ecommerce</category>
    </item>
    <item>
      <title>Failing over to a backup region or origin? A 12-point checklist so DNS, TLS and sessions actually survive</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Fri, 27 Nov 2026 10:40:59 +0000</pubDate>
      <link>https://dev.to/upordownonline/failing-over-to-a-backup-region-or-origin-a-12-point-checklist-so-dns-tls-and-sessions-actually-4eb1</link>
      <guid>https://dev.to/upordownonline/failing-over-to-a-backup-region-or-origin-a-12-point-checklist-so-dns-tls-and-sessions-actually-4eb1</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5131994" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Failover looks simple on a slide: if region A is down, send traffic to region B. On the day, DNS is still serving the old address, the certificate on B is for a different hostname, login sessions are in a Redis that only exists in A, and the uptime monitor is still checking A's load balancer, which is the one that's down.&lt;/p&gt;

&lt;p&gt;Here is the checklist I want filled in &lt;em&gt;before&lt;/em&gt; the incident, then walked again during one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before you ever fail over
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Write down what "failover" means.&lt;/strong&gt; Active-active (both regions already serve traffic) is a different motion from active-passive (B is standing by). Cold spare (B is started during the incident) is a third. Each has a different RTO, and a different way to get it wrong. If the runbook says "fail over" without saying which, people will improvise.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. List every name that has to move.&lt;/strong&gt; Apex, &lt;code&gt;www&lt;/code&gt;, &lt;code&gt;api&lt;/code&gt;, &lt;code&gt;cdn&lt;/code&gt;, &lt;code&gt;status&lt;/code&gt;, image hosts, webhook endpoints you gave to payment providers, MX if this is also email. A site can "fail over" while checkout still posts to a region-A API name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Check TTLs and the actual resolvers that matter.&lt;/strong&gt; A 60-second TTL does not mean the cut happens in 60 seconds. Corporate resolvers, browsers, and some mobile carriers cache longer. Know the realistic window, and don't promise a 30-second failover with a 300-second TTL on the apex.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Put valid certificates on B, for the public names, today.&lt;/strong&gt; Not a staging cert, not a cert for &lt;code&gt;b.internal.example.com&lt;/code&gt;. Issue and renew them on a schedule even while B is idle. A failover that ends in &lt;code&gt;NET::ERR_CERT_COMMON_NAME_INVALID&lt;/code&gt; is a longer outage, not a recovery.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Replicate the data B needs, and test a read.&lt;/strong&gt; Databases, object storage, session stores, feature flags, uploaded files. "We have replicas" is not the same as "we promoted one last quarter and the app booted". If some data is region-bound (a local Redis, a local job queue), decide now whether those users are logged out, and say so.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Decide what happens to scheduled jobs.&lt;/strong&gt; If cron, workers or webhook consumers run in both regions during failover, you will double-charge, double-email or double-ship. If they run in neither, invoices and password resets stop. Pin each job to a primary, and write how it moves.&lt;/p&gt;

&lt;h2&gt;
  
  
  During a failover
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;7. Change the thing that actually steers traffic.&lt;/strong&gt; For some setups that is DNS. For others it is a global load balancer, an Anycast address, or a feature flag at the CDN. Changing DNS while a CDN still origins at region A does nothing. Do the steering change once, record the time, and do not "also" tweak six other knobs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8. Drain, don't just flip, if A is degraded rather than dead.&lt;/strong&gt; Existing connections and in-flight POSTs deserve a short drain. If A is hard-down, skip this and go.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9. Check the public names from outside, not from the B bastion.&lt;/strong&gt; From a laptop or an external checker, &lt;code&gt;dig&lt;/code&gt; the names, then &lt;code&gt;curl -vI https://the-public-name/&lt;/code&gt; and confirm the certificate, the status code, and that the response is from B (a region header, a unique asset, a version). A 200 from inside B's VPC is not evidence that customers have moved.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The first check after a failover has to come from outside the region you just failed out of, and the one you just failed into.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5131994" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; watches the public URL from outside your infrastructure, so you can see whether the cut actually worked for visitors, not only for a host on the new VPC.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;10. Watch sessions, payments and webhooks, not just the homepage.&lt;/strong&gt; Log in, start a checkout, confirm a webhook test delivery still arrives. These are the paths that keep hidden region assumptions (sticky cookies, IP allowlists, a provider callback URL).&lt;/p&gt;

&lt;h2&gt;
  
  
  After traffic is on B
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;11. Tell people, and keep A from coming back half-alive.&lt;/strong&gt; Update the status page. Disable or fence writers in A so a surprised recovery of A does not split-brain the database. Pause the region-A schedulers if you didn't already.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;12. Schedule the fail-back as a planned change, with the same checklist in reverse.&lt;/strong&gt; The return to A is where I've seen more mistakes than the original failover: TTLs still pointing at B for some resolvers, a cert on A that expired while it was idle, a monitor still pointed at B so nobody notices A is wrong. Fail-back is another failover.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things people skip that then dominate the outage
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Provider allowlists.&lt;/strong&gt; Email, payments, and fraud tools may only accept requests from region A's NAT IPs. B's IPs need to be on those lists before the day.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limits and bot rules.&lt;/strong&gt; A sudden move of all traffic to B looks like an attack to a WAF that has only ever seen B used for health checks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The monitor's own target.&lt;/strong&gt; If the check URL is a regional hostname or a hardcoded IP in A, the monitor will stay red after a successful failover, or stay green if you fail to move and you pointed the check at B "to test it". Check the public name.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run a planned failover in staging or on a quiet morning at least once. A checklist you have never executed is still a hope.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/your-dns-ttl-is-why-the-outage-lasted-2-hours-set-it-before-you-need-it-meh"&gt;Your DNS TTL is why the outage lasted 2 hours: set it before you need it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/multi-region-uptime-monitoring-faq-10-questions-about-checking-your-site-from-more-than-one-place-10jb"&gt;Multi-region uptime monitoring FAQ: 10 questions about checking your site from more than one place&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/changing-dns-providers-a-12-point-checklist-so-your-site-and-email-survive-the-move-362a"&gt;Changing DNS providers? A 12-point checklist so your site and email survive the move&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/case-study-hypothetical-redis-ran-out-of-memory-the-homepage-still-returned-200-and-checkout-1e4e"&gt;Case study (hypothetical): Redis ran out of memory, the homepage still returned 200, and checkout failed silently for 90 minutes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/moving-the-database-to-a-new-host-or-a-new-major-version-a-12-point-checklist-so-the-site-5aoi"&gt;Moving the database to a new host (or a new major version)? A 12-point checklist so the site doesn't look 'up' while every write fails&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have you actually failed over in anger? What was the thing that still pointed at the old region after everything else had moved?&lt;/p&gt;

</description>
      <category>devops</category>
      <category>dns</category>
      <category>sre</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Should your uptime checks run from the same cloud region as your servers, or only from the public internet? Let's argue about it</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Thu, 26 Nov 2026 11:06:41 +0000</pubDate>
      <link>https://dev.to/upordownonline/should-your-uptime-checks-run-from-the-same-cloud-region-as-your-servers-or-only-from-the-public-4pma</link>
      <guid>https://dev.to/upordownonline/should-your-uptime-checks-run-from-the-same-cloud-region-as-your-servers-or-only-from-the-public-4pma</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5124067" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If your app runs in &lt;code&gt;us-east-1&lt;/code&gt;, it is tempting to put the uptime checker there too. Latency is low, the bill is small, and the check almost never fails for "network fluff". It is also tempting to do the opposite: only check from a laptop-like vantage point on the public internet, because that is where customers are.&lt;/p&gt;

&lt;p&gt;Both choices miss a class of outage. The argument is about which class you are more willing to miss, or whether you should run both.&lt;/p&gt;

&lt;p&gt;Let's argue about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The case for checking from the public internet, outside your cloud
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Users are not in your VPC.&lt;/strong&gt; A probe that sits next to the load balancer never walks the path a customer walks: public DNS, the CDN, a TLS handshake at the edge, maybe a WAF, maybe an Anycast hop. A typo in a DNS record, an expired certificate on the CDN, a WAF rule that blocks a country, a provider outage between the internet and your region — all of those can leave an in-region check green.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Same-network checks are correlated with the outage.&lt;/strong&gt; If the availability zone or the region's DNS has a bad afternoon, a checker in that zone fails for the same reason your app does, or worse, cannot reach the alerting endpoint either. An external checker is a second bet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"It works from the office" is the same trap.&lt;/strong&gt; An internal probe is the office network, automated. You already know that debugging from a bastion host hides problems. A monitor in the same place has the same blind spot.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Status pages and SLAs are about the public path.&lt;/strong&gt; If you tell customers the site is up, you mean "up for them", not "the origin responded to a private IP".&lt;/p&gt;

&lt;h2&gt;
  
  
  The case for checking from the same region, even the same network
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;You want to see backends, not just the front door.&lt;/strong&gt; A public check that hits a load balancer can stay green with one of three targets dead, because the remaining two are healthy. A check against each instance, from inside, is how you find the bad canary or the node that failed its deploy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public path noise is real.&lt;/strong&gt; Mobile networks, regional ISPs, and distant probes produce timeouts that are not your incident. Teams that only use far-away public checks either ignore alerts or spend nights proving the problem was someone else's backbone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some failures never leave the VPC.&lt;/strong&gt; A security group that blocks the app from the database, a broken internal TLS cert, a service discovery entry pointing at a terminated task: the load balancer may still serve a stale but valid page, or a degraded subset of routes. Internal checks catch those earlier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cost and rate limits.&lt;/strong&gt; Probing every internal service from the public internet, on a short interval, through the CDN, is a worse design than a cheap in-cluster probe for those targets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where I've landed
&lt;/h2&gt;

&lt;p&gt;I want both, and I want them to mean different things.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The page that customers see is checked from outside&lt;/strong&gt;, from more than one network, through the same DNS name they use. That check is what pages a human and what drives the public status page. It should not originate in the same account, region and VPC as the app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Each backend and dependency is checked from inside&lt;/strong&gt;, by the load balancer's health check and by a short internal probe. Those alerts go to the team, not necessarily to the status page. They answer "is this instance or this dependency sick?"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not treat an internal 200 as uptime.&lt;/strong&gt; An origin that answers on a private name while the certificate on the public name is expired is down. I have seen this exact split happen after someone pointed the monitor at the origin "to make it less noisy".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you can only afford one kind of check, pick the public one.&lt;/strong&gt; A dead instance behind a working load balancer is a reliability problem. A public DNS or TLS failure is a customer-facing outage. Start with the outage users can see.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A check that lives next to your origin will not see the DNS, TLS or routing failure your users are already hitting.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5124067" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; watches the public URL from outside your own infrastructure, so the path it tests is the path customers use.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The parts I'm still unsure about
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multi-region apps.&lt;/strong&gt; If you serve from three regions, a single public probe may always land in a healthy one. Do you force geo-specific checks, or is "someone, somewhere, can reach us" enough?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private apps.&lt;/strong&gt; An internal tool that is only reachable over VPN has no honest public path. There I would check from the same network the users are on, which might be the VPN or a zero-trust connector, not the public internet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How far "outside" has to be.&lt;/strong&gt; A probe in another region of the same cloud provider is better than the same VPC, but it will still miss a provider-wide DNS event. A probe on a different provider is better again. I don't know how many independent networks is enough for a small team.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A quick experiment
&lt;/h2&gt;

&lt;p&gt;Pick your last three incidents. For each, ask: would a probe in the same VPC have failed? Would a probe only on the public hostname have failed? I have done this on a few teams' histories. The answers rarely line up, which is the whole argument.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-504-gateway-timeout-find-whether-its-nginx-the-load-balancer-cloudflare-or-a-slow-1e28"&gt;How to fix 504 Gateway Timeout: find whether it's nginx, the load balancer, Cloudflare, or a slow origin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/multi-region-uptime-monitoring-faq-10-questions-about-checking-your-site-from-more-than-one-place-10jb"&gt;Multi-region uptime monitoring FAQ: 10 questions about checking your site from more than one place&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/ping-is-not-an-uptime-check-5-ways-icmp-lies-about-whether-your-site-is-up-4el0"&gt;Ping is not an uptime check: 5 ways ICMP lies about whether your site is up&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/case-study-hypothetical-the-site-that-was-down-only-for-people-on-ipv6-and-every-monitor-said-14i"&gt;Case study (hypothetical): the site that was down only for people on IPv6, and every monitor said it was fine&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Where do your checks run today, and which outage are you most worried they would miss?&lt;/p&gt;

</description>
      <category>monitoring</category>
      <category>devops</category>
      <category>discuss</category>
      <category>cloud</category>
    </item>
    <item>
      <title>How to fix 504 Gateway Timeout: find whether it's nginx, the load balancer, Cloudflare, or a slow origin</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Thu, 26 Nov 2026 11:06:24 +0000</pubDate>
      <link>https://dev.to/upordownonline/how-to-fix-504-gateway-timeout-find-whether-its-nginx-the-load-balancer-cloudflare-or-a-slow-1e28</link>
      <guid>https://dev.to/upordownonline/how-to-fix-504-gateway-timeout-find-whether-its-nginx-the-load-balancer-cloudflare-or-a-slow-1e28</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5124065" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A 504 Gateway Timeout is not an application error. It is a proxy error. Something in front of your app — nginx, an AWS load balancer, Cloudflare, a Kubernetes ingress — waited for an upstream response, hit a limit, and returned 504 to the visitor. The origin may still be working, slowly, or it may be stuck. Until you know which hop gave up, raising a random timeout will not help.&lt;/p&gt;

&lt;p&gt;This is how to find the hop, read the timeout that fired, and fix the cause rather than hiding it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Confirm it is a 504, and who sent it
&lt;/h2&gt;

&lt;p&gt;From a machine that can reproduce the request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sS -D- -o /dev/null --max-time 120 https://example.com/slow-path
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look at the status and the headers. A 504 from nginx often includes &lt;code&gt;Server: nginx&lt;/code&gt;. Cloudflare adds &lt;code&gt;cf-ray&lt;/code&gt; and usually an error code in the body (&lt;code&gt;error code: 524&lt;/code&gt; is Cloudflare's own "origin took too long", which is a cousin of 504). An AWS Application Load Balancer 504 typically has &lt;code&gt;Server: awselb/2.0&lt;/code&gt;. The &lt;code&gt;via&lt;/code&gt; and &lt;code&gt;x-cache&lt;/code&gt; headers, if present, also tell you which layer answered.&lt;/p&gt;

&lt;p&gt;If you cannot reproduce it yourself, get a HAR file or the &lt;code&gt;cf-ray&lt;/code&gt; / request id from the person who can. A 504 that only happens for one URL or one customer is a different problem from a site-wide 504.&lt;/p&gt;

&lt;h2&gt;
  
  
  Find the timeout that actually fired
&lt;/h2&gt;

&lt;p&gt;Every hop has its own limit, and they have to make sense together. The outermost timeout must be &lt;em&gt;longer&lt;/em&gt; than the ones behind it, or the outer proxy will always lose the race.&lt;/p&gt;

&lt;p&gt;Typical defaults:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;nginx&lt;/strong&gt; &lt;code&gt;proxy_read_timeout&lt;/code&gt; — 60 seconds. Also check &lt;code&gt;proxy_connect_timeout&lt;/code&gt; and &lt;code&gt;proxy_send_timeout&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AWS ALB&lt;/strong&gt; idle timeout — 60 seconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloudflare&lt;/strong&gt; — 100 seconds on many plans, then a 524.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gunicorn / uWSGI / Puma&lt;/strong&gt; worker timeout — often 30 seconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your language runtime&lt;/strong&gt; — HTTP client timeouts to databases and APIs, sometimes infinite, sometimes 10 seconds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On nginx, the error log is explicit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;upstream timed out (110: Connection timed out) while reading response header from upstream
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That line is a &lt;code&gt;proxy_read_timeout&lt;/code&gt;. If you instead see a connect timeout, the origin never accepted the connection (it is down, saturated, or listening on the wrong socket). A read timeout means the connection was accepted and then nothing useful came back in time.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo grep -E &lt;span class="s2"&gt;"timed out|504"&lt;/span&gt; /var/log/nginx/error.log &lt;span class="o"&gt;|&lt;/span&gt; tail
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For an ALB, the access logs have a &lt;code&gt;target_processing_time&lt;/code&gt; that sits at or just above the idle timeout when this is the cause. In Kubernetes, check the ingress controller's timeout annotations; they are often left at 60 seconds while a report endpoint needs 90.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is the origin slow, or is it stuck?
&lt;/h2&gt;

&lt;p&gt;A timeout is a symptom. Raise it only if the work genuinely needs longer. Otherwise you will trade 504s for a pile of stuck workers.&lt;/p&gt;

&lt;p&gt;On the origin, look at the same request id or the same URL around the timestamp:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# if you log request duration&lt;/span&gt;
sudo journalctl -u myapp --since &lt;span class="s2"&gt;"10 min ago"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep -E &lt;span class="s2"&gt;"duration|timeout|504"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Useful splits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Always slow, same URL.&lt;/strong&gt; The handler is expensive: a report, a large export, a missing index, an N+1 query. Fix the query or make the work asynchronous. Do not raise the public timeout to 5 minutes so a CSV export can finish in the request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Suddenly slow, many URLs.&lt;/strong&gt; A dependency is degraded: the database, a cache, a payment API, DNS inside the VPC. Check connection pool wait times and upstream latency. A 504 wave that starts at a deploy is often a lock, a migration, or a connection pool that is too small for the new code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connect timeouts, not read timeouts.&lt;/strong&gt; The process is dead, not listening, or has too few workers to accept. That is not a timeout-tuning problem.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="c1"&gt;-- Postgres: queries running longer than your proxy timeout&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;query_start&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;running&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;left&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;120&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_stat_activity&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="s1"&gt;'idle'&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;query_start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you see queries older than the proxy timeout, the proxy already gave up and the database is still working for a client that is gone. That is how a single slow query turns into a pool of stuck backends and then a site-wide 504.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A 504 is what visitors see when a hop in front of you gives up; your origin logs may still look busy and healthy.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5124065" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; checks the public URL from outside, with a finite timeout, so a gateway timeout is an alert with a timestamp, not a screenshot in a support ticket.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What to change, and in what order
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Identify the hop that emitted the 504.&lt;/strong&gt; Do not raise nginx if Cloudflare already cut the request off at 100 seconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Align timeouts from the inside out.&lt;/strong&gt; Origin worker timeout &amp;lt; ingress / nginx &amp;lt; load balancer &amp;lt; CDN. Each layer should wait a little longer than the one behind it, and the client (browser, mobile app, your monitor) should wait a little longer than the CDN.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fix the slow work&lt;/strong&gt; if a page that used to take 400 ms now takes 70 seconds. Raising the timeout papers over it until the next traffic spike.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Move long jobs off the request.&lt;/strong&gt; Generate the export, then let the client poll or download it. A user-facing HTTP request should not run past a minute if you can help it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load-test the new limit&lt;/strong&gt; if you really must raise it. More in-flight requests means more memory, more database connections, more workers. A higher timeout without more capacity turns a few 504s into a complete stall.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For nginx, a targeted override is better than a global one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="n"&gt;location&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;reports&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;proxy_read_timeout&lt;/span&gt; &lt;span class="mi"&gt;120s&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;proxy_pass&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//app;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Leave &lt;code&gt;/&lt;/code&gt; at 60 seconds. A slow admin report should not set the budget for the homepage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't forget the monitor
&lt;/h2&gt;

&lt;p&gt;If your uptime check hits a cheap URL with a 10-second timeout, it will stay green through a 504 on the slow path that actually matters. If it hits the slow path with a timeout shorter than the proxy, it will alert on a 504 that users with a longer client timeout might not even see. Point a check at the real path, and set its timeout just above the outermost proxy timeout, so it fails when visitors fail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-502-bad-gateway-in-nginx-find-the-error-log-line-that-tells-you-why-1a7h"&gt;How to fix 502 Bad Gateway in Nginx: find the error log line that tells you why&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/vs-504-what-each-error-means-and-who-has-to-fix-it-5g20"&gt;503 vs 504: what each error means and who has to fix it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-cloudflare-errors-520-521-522-and-524-which-one-points-at-your-origin-and-what-to-1g1a"&gt;How to fix Cloudflare errors 520, 521, 522 and 524: which one points at your origin, and what to check first&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/should-your-uptime-checks-run-from-the-same-cloud-region-as-your-servers-or-only-from-the-public-4pma"&gt;Should your uptime checks run from the same cloud region as your servers, or only from the public internet? Let's argue about it&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Have you chased a 504 that wasn't the proxy you first blamed? Which hop was it actually, and how did you prove it?&lt;/p&gt;

</description>
      <category>nginx</category>
      <category>devops</category>
      <category>debugging</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to fix 'Too many open files' (EMFILE) before it takes your site down: ulimit, systemd and the leak behind it</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Mon, 23 Nov 2026 10:04:59 +0000</pubDate>
      <link>https://dev.to/upordownonline/how-to-fix-too-many-open-files-emfile-before-it-takes-your-site-down-ulimit-systemd-and-the-ijj</link>
      <guid>https://dev.to/upordownonline/how-to-fix-too-many-open-files-emfile-before-it-takes-your-site-down-ulimit-systemd-and-the-ijj</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5099360" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It usually shows up in a log as one of these:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;accept4() failed (24: Too many open files)
Error: EMFILE: too many open files, open '/app/templates/index.html'
java.net.SocketException: Too many open files
OSError: [Errno 24] Too many open files
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And from the outside, it shows up as a site that slowly stops answering. Some requests work, new connections hang or get refused, health checks may still pass if they reuse an existing connection, and then everything falls over.&lt;/p&gt;

&lt;p&gt;Error 24 (&lt;code&gt;EMFILE&lt;/code&gt;) means a single process has reached its limit on file descriptors. On Linux, almost everything is a file descriptor: open files, but also every TCP connection, every pipe, every socket to the database, every log file. A web server handling 2,000 concurrent connections needs at least 2,000 of them, and the default limit for many processes is 1,024.&lt;/p&gt;

&lt;p&gt;There are two separate problems hiding in this error: a limit that's too low, and something using more descriptors than it should. You usually need to fix both.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: see the real limit of the running process
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;ulimit -n&lt;/code&gt; in your shell tells you &lt;em&gt;your shell's&lt;/em&gt; limit, which is often not what the service is running with. Check the actual process:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;pid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;pgrep -f &lt;span class="s1"&gt;'nginx: worker'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; head -1&lt;span class="o"&gt;)&lt;/span&gt;   &lt;span class="c"&gt;# an nginx worker; for your own app, pick a worker pid&lt;/span&gt;
grep &lt;span class="s1"&gt;'open files'&lt;/span&gt; /proc/&lt;span class="nv"&gt;$pid&lt;/span&gt;/limits
ls /proc/&lt;span class="nv"&gt;$pid&lt;/span&gt;/fd &lt;span class="o"&gt;|&lt;/span&gt; wc -l       &lt;span class="c"&gt;# how many it has open right now&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the second number is close to the first, you've found the problem. If the process has many workers (Nginx, Gunicorn, PHP-FPM), check a worker, not the master: the limit is per process. That is why the snippet picks an nginx worker; &lt;code&gt;pgrep -o nginx&lt;/code&gt; would return the master process instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: raise the limit the right way
&lt;/h2&gt;

&lt;p&gt;Where the limit comes from depends on how the process is started.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;systemd services&lt;/strong&gt; (most things on a modern Linux server) ignore &lt;code&gt;/etc/security/limits.conf&lt;/code&gt;. That file applies to login sessions via PAM, not to services. Set it in the unit instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo systemctl edit myapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="k"&gt;[Service]&lt;/span&gt;
&lt;span class="na"&gt;LimitNOFILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;65536&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then &lt;code&gt;sudo systemctl daemon-reload &amp;amp;&amp;amp; sudo systemctl restart myapp&lt;/code&gt;, and check &lt;code&gt;/proc/&amp;lt;pid&amp;gt;/limits&lt;/code&gt; again. This is the step most people miss: they edit &lt;code&gt;limits.conf&lt;/code&gt;, restart, and the service still has 1,024.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nginx&lt;/strong&gt; has its own setting for workers, on top of the systemd limit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight nginx"&gt;&lt;code&gt;&lt;span class="n"&gt;worker_rlimit_nofile&lt;/span&gt; &lt;span class="mi"&gt;65536&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;events&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;worker_connections&lt;/span&gt; &lt;span class="mi"&gt;16384&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each proxied connection uses two descriptors (one to the client, one to the upstream), so &lt;code&gt;worker_connections&lt;/code&gt; should be comfortably below half of &lt;code&gt;worker_rlimit_nofile&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Docker containers&lt;/strong&gt; get their limit from the daemon default or from &lt;code&gt;--ulimit nofile=65536:65536&lt;/code&gt; (or &lt;code&gt;ulimits:&lt;/code&gt; in Compose). Check from inside the container with &lt;code&gt;cat /proc/1/limits&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The system-wide ceiling&lt;/strong&gt; is &lt;code&gt;fs.file-max&lt;/code&gt; (&lt;code&gt;cat /proc/sys/fs/file-max&lt;/code&gt;). It's very high by default on modern kernels and rarely the problem, but if &lt;code&gt;cat /proc/sys/fs/file-nr&lt;/code&gt; shows the first number near the maximum, the whole machine is out, not one process.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A process slowly running out of descriptors looks fine from inside until the moment it doesn't.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5099360" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; checks your site from outside with fresh connections, which is exactly the kind of request that fails first when a server hits its file limit.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 3: find out what's using them
&lt;/h2&gt;

&lt;p&gt;Raising the limit buys time. If the count keeps growing, you have a leak, and it will reach 65,536 too, just later. Look at what the descriptors actually are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ls -l /proc/&lt;span class="nv"&gt;$pid&lt;/span&gt;/fd &lt;span class="o"&gt;|&lt;/span&gt; awk &lt;span class="s1"&gt;'{print $NF}'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sed -E &lt;span class="s1"&gt;'s/[0-9]+/N/g'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sort &lt;span class="o"&gt;|&lt;/span&gt; uniq -c &lt;span class="o"&gt;|&lt;/span&gt; sort -rn &lt;span class="o"&gt;|&lt;/span&gt; head
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This groups them by type: &lt;code&gt;socket:[N]&lt;/code&gt;, &lt;code&gt;pipe:[N]&lt;/code&gt;, and file paths. Or with lsof:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;sudo lsof -p &lt;span class="nv"&gt;$pid&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; awk &lt;span class="s1"&gt;'{print $5}'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; sort &lt;span class="o"&gt;|&lt;/span&gt; uniq -c &lt;span class="o"&gt;|&lt;/span&gt; sort -rn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Common culprits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Thousands of sockets in &lt;code&gt;CLOSE_WAIT&lt;/code&gt;.&lt;/strong&gt; Check with &lt;code&gt;ss -tanp | grep CLOSE_WAIT | grep $pid | wc -l&lt;/code&gt;. &lt;code&gt;CLOSE_WAIT&lt;/code&gt; means the other side closed the connection and your process never called &lt;code&gt;close()&lt;/code&gt;. This is almost always a bug in the application: an HTTP client response body that's never read or closed, or a database connection that's never returned to the pool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The same file open hundreds of times.&lt;/strong&gt; A template, config or log file opened on every request and never closed. In Python, an &lt;code&gt;open()&lt;/code&gt; without a &lt;code&gt;with&lt;/code&gt; block in a hot path; in Node, a stream that's never ended.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An HTTP client created per request.&lt;/strong&gt; Many libraries keep a connection pool per client object. Create a new client per request and every request leaves idle connections behind until garbage collection, which may never come.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deleted log files still held open.&lt;/strong&gt; &lt;code&gt;lsof +L1&lt;/code&gt; lists files that were deleted but are still open. Log rotation without telling the process to reopen its logs leaves these behind, and they also hold disk space.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 4: watch it
&lt;/h2&gt;

&lt;p&gt;Once fixed, keep an eye on the number so the next leak doesn't surprise you:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;watch -n 5 &lt;span class="s2"&gt;"ls /proc/$(pgrep -o myapp)/fd | wc -l"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For something permanent, most metrics agents export &lt;code&gt;process_open_fds&lt;/code&gt; and &lt;code&gt;process_max_fds&lt;/code&gt; (Prometheus client libraries do this out of the box for many languages). Alert when open descriptors pass 80% of the limit; it gives you hours of warning on a slow leak.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why monitors often miss this
&lt;/h2&gt;

&lt;p&gt;An internal health check that runs inside the process, or reuses a keep-alive connection, can keep passing while new clients are being refused. The first requests to fail are new connections from the outside world, which is exactly what real visitors make. That's why it's worth having at least one check that opens a fresh connection from outside your network, such as an &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5099360" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; monitor on the public URL.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/should-planned-maintenance-count-against-your-uptime-number-lets-argue-about-it-598a"&gt;Should planned maintenance count against your uptime number? Let's argue about it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-502-bad-gateway-in-nginx-find-the-error-log-line-that-tells-you-why-1a7h"&gt;How to fix 502 Bad Gateway in Nginx: find the error log line that tells you why&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/econnrefused-vs-etimedout-vs-econnreset-what-your-monitors-error-is-actually-telling-you-3pi9"&gt;ECONNREFUSED vs ETIMEDOUT vs ECONNRESET: what your monitor's error is actually telling you&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/vs-504-what-each-error-means-and-who-has-to-fix-it-5g20"&gt;503 vs 504: what each error means and who has to fix it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-read-curl-v-output-to-find-where-a-request-fails-49nh"&gt;How to read curl -v output to find where a request fails&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-nfconntrack-table-full-dropping-packet-the-linux-connection-tracking-limit-that-4ca3"&gt;How to fix 'nf_conntrack: table full, dropping packet': the Linux connection-tracking limit that makes a site look randomly down&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What was the leak the last time you hit EMFILE? Mine was an HTTP client created inside a loop, which looked harmless in code review.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>nginx</category>
      <category>node</category>
    </item>
    <item>
      <title>Should planned maintenance count against your uptime number? Let's argue about it</title>
      <dc:creator>upordown.online</dc:creator>
      <pubDate>Mon, 23 Nov 2026 10:04:41 +0000</pubDate>
      <link>https://dev.to/upordownonline/should-planned-maintenance-count-against-your-uptime-number-lets-argue-about-it-598a</link>
      <guid>https://dev.to/upordownonline/should-planned-maintenance-count-against-your-uptime-number-lets-argue-about-it-598a</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Uptime monitoring from outside your own infrastructure that alerts you the minute your site goes down — &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5099358" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Read the small print of almost any hosting or SaaS SLA and you'll find a sentence like this: &lt;em&gt;"Availability excludes scheduled maintenance announced at least 48 hours in advance."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It sounds reasonable. You can't upgrade a database without downtime sometimes, and it seems unfair to count a planned, announced window the same way as a 3 a.m. crash.&lt;/p&gt;

&lt;p&gt;But think about it from the customer's side. They tried to use the product on Sunday morning and it wasn't there. The fact that there was a banner about it on Thursday doesn't change that. And a team that excludes maintenance can, in theory, take the site down every weekend and still report 99.95%.&lt;/p&gt;

&lt;p&gt;So which is right? Let's argue about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The case for excluding maintenance
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;It measures what you're trying to improve.&lt;/strong&gt; Uptime numbers are mostly used to track reliability: are we having fewer unexpected failures? Planned maintenance is a decision, not a failure. Mixing them makes the trend harder to read.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Announced downtime is less harmful.&lt;/strong&gt; Customers who know about a window can plan around it: run the report on Friday, tell their own users, schedule the import for Monday. A surprise outage of the same length does far more damage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It keeps incentives sane.&lt;/strong&gt; If every minute of maintenance counts, teams avoid necessary upgrades, postpone database migrations and run outdated software longer. That usually ends in a much bigger unplanned outage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Everyone does it.&lt;/strong&gt; If your SLA counts maintenance and your competitor's doesn't, your number looks worse for the same reliability. Customers comparing SLAs aren't reading the footnotes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The case for counting it
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The customer was still locked out.&lt;/strong&gt; Availability is about whether the product was usable, not whether you meant it to be unusable. From the outside, a planned outage and an unplanned one look exactly the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exclusions get abused.&lt;/strong&gt; Once maintenance doesn't count, there's a temptation to declare an emergency fix as "maintenance" after the fact, or to schedule very long windows "just in case". The number stays perfect and stops meaning anything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It hides a real problem.&lt;/strong&gt; If your system needs four hours of downtime a month to stay healthy, that is a reliability characteristic worth knowing. Counting it makes the case for investing in zero-downtime deploys and online migrations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Global users don't have quiet hours.&lt;/strong&gt; "Sunday at 02:00" is Sunday morning in Asia and Saturday evening in the Americas. The window that's quiet for your office is somebody's busiest hour.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where I've landed
&lt;/h2&gt;

&lt;p&gt;I think the answer is: report two numbers, and be honest about which one you're showing.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Internally, track total availability, including maintenance.&lt;/strong&gt; This is the number engineering uses to decide whether to invest in zero-downtime operations. It should be uncomfortable when maintenance is long.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Externally, it's fine to exclude maintenance from an SLA, if the rules are strict.&lt;/strong&gt; Announced in advance, a fixed maximum per month, and never applied retroactively. If a window overruns, the overrun counts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Show maintenance clearly on the status page.&lt;/strong&gt; Planned windows should be visible in advance and in the history. Customers trust a page that shows "maintenance, 40 minutes" more than one that's suspiciously perfect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Measure the window itself.&lt;/strong&gt; Did the site actually come back when the window ended? An outside check during and after maintenance tells you exactly how long users were locked out, including the 25 minutes after "we're done" while caches warmed up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep monitoring running during maintenance.&lt;/strong&gt; Silence the alerts if you must, but don't pause the checks. You want the record.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pausing the monitor during maintenance is how you miss the part where it didn't come back.&lt;/strong&gt; &lt;a href="https://upordown.online?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=5099358" rel="noopener noreferrer"&gt;upordown.online&lt;/a&gt; keeps checking from outside your infrastructure, so you know exactly when the site was really unreachable, planned or not.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What makes this hard
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Partial maintenance.&lt;/strong&gt; If search is read-only for an hour but everything else works, is that downtime? Counting it as full downtime overstates the impact; ignoring it understates it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Third-party maintenance.&lt;/strong&gt; Your payment provider schedules a window and checkout is unavailable. It's not your maintenance, but it's your customers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Degraded" during migrations.&lt;/strong&gt; Some migrations don't take the site down; they just make it slow for hours. That doesn't show up in an uptime number at all, which may be the bigger blind spot.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Small teams.&lt;/strong&gt; For a two-person company, "zero-downtime everything" may be a lot of engineering for a site with a few hundred users. A short monthly window might genuinely be the right trade.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A quick check for your own number
&lt;/h2&gt;

&lt;p&gt;Take last quarter's uptime report and add up the maintenance minutes that were excluded. Then compare:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Total minutes the site was unreachable for any reason.&lt;/li&gt;
&lt;li&gt;Minutes excluded as maintenance.&lt;/li&gt;
&lt;li&gt;How many of those windows overran their announced end time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the excluded minutes are a large share of the total, your reported uptime is mostly describing how carefully you schedule downtime, not how reliable the site is. That's worth knowing even if the SLA stays the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd put in the announcement
&lt;/h2&gt;

&lt;p&gt;Whichever way you count it, the announcement is where maintenance earns its exclusion. A good one says what will be unavailable (all of it, or only writes, or only one region), the start time in UTC and in your main customers' zone, the expected length, and what happens to requests during the window: queued, rejected, or shown a maintenance page. Then post an update when it actually ends, with the real duration. Customers forgive planned downtime much more easily when the end time on the status page matches what they saw.&lt;/p&gt;

&lt;h2&gt;
  
  
  Related reading
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/if-i-set-up-our-status-page-again-heres-what-id-do-differently-397b"&gt;If I set up our status page again, here's what I'd do differently&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/no-deploys-on-friday-wise-rule-or-a-sign-your-monitoring-is-broken-1e4i"&gt;No deploys on Friday: wise rule or a sign your monitoring is broken?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/blue-green-vs-canary-vs-rolling-deploys-what-each-one-protects-you-from-and-what-it-doesnt-237m"&gt;Blue-green vs canary vs rolling deploys: what each one protects you from (and what it doesn't)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/multi-region-uptime-monitoring-faq-10-questions-about-checking-your-site-from-more-than-one-place-10jb"&gt;Multi-region uptime monitoring FAQ: 10 questions about checking your site from more than one place&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/how-to-fix-too-many-open-files-emfile-before-it-takes-your-site-down-ulimit-systemd-and-the-ijj"&gt;How to fix 'Too many open files' (EMFILE) before it takes your site down: ulimit, systemd and the leak behind it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/upordownonline/should-you-report-uptime-from-synthetic-checks-or-from-real-user-traffic-lets-argue-about-it-4937"&gt;Should you report uptime from synthetic checks or from real user traffic? Let's argue about it&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How does your team count it? Do your reported uptime numbers include maintenance, and has a customer ever pushed back on the exclusions?&lt;/p&gt;

</description>
      <category>devops</category>
      <category>sre</category>
      <category>monitoring</category>
      <category>discuss</category>
    </item>
  </channel>
</rss>
