DEV Community

Yan Gao
Yan Gao

Posted on

Running 12 Small Sites Solo: 4 Monitoring Bugs That Forced Me to Build a One-Screen Console on Cloudflare Workers + D1

If you run one website, checking Google Search Console, analytics, and your payment dashboard takes two minutes.

If you run 12 small sites solo (a mix of AI tools, craft pattern makers, calculators, and micro-SaaS), two minutes turns into a ritual you quietly skip—and skipping it is how silent failures eat a week of traffic before you notice.

Over the past few months, three silent bugs bit my own portfolio:

  1. One site's Google impressions dropped by ~90% after a metadata tweak, and I didn't notice for 7 days.
  2. Two sites had their main landing pages stuck in "Crawled – currently not indexed" for weeks while I assumed they were live in search.
  3. A third-party API started returning 403s and broke a core user flow without throwing a 500 on the homepage.

So I built AllSites—a single-screen portfolio console running on Cloudflare Workers + D1 that pulls uptime, first-party visitors, Google Search Console, Bing Webmaster Tools, and read-only revenue (Stripe, Dodo Payments, PayPal, Lemon Squeezy) into one "Needs attention today" queue.

Along the way, building a real multi-site monitoring product surfaced four sneaky data-engineering bugs that almost every DIY dashboard gets wrong. Sharing them here in case you're building your own telemetry stack.


1. Cloudflare Web Analytics RUM Uses Adaptive Sampling (Why Small Sites Show Multiples of 10)

When I first wired Cloudflare's GraphQL Analytics API (rumPageloadEventsAdaptiveGroups) into the dashboard, my smaller sites looked bizarre:

  • Day A: 100 visits
  • Day B: 0 visits
  • Day C: 100 visits

Every single number was an exact multiple of 10 (10, 20, 50, 100, 120), even when server logs showed 12–14 real people per day.

Why: Cloudflare Web Analytics RUM uses adaptive sampling on rumPageloadEventsAdaptiveGroups. When the sampler picks sampleInterval = 10 (or 100), a single sampled visit gets multiplied by 10 or 100—and if no visit happens to be sampled on a quiet day, that day reads 0. On top of that, ChatGPT strips referrers, so Cloudflare buckets AI search traffic under direct.

The fix: Keep Cloudflare RUM as an optional historical fallback (clearly labeled as sampled), and ship a <2 KB unsampled first-party script (t.js) that filters obvious bots, respects privacy (no raw IP storage, no cross-site tracking), excludes your own browser tests, and preserves utm_source / ChatGPT referrals. Once a site has real first-party visits, prefer those exact counts immediately.


2. Never Permanently Invalidate an Integration on a Single Timeout

A classic cron trap: your scheduled Worker loops through 11 sites sequentially, hitting an external GraphQL or Webmaster API with a 20-second AbortSignal.timeout. One site hangs for 21 seconds, throws AbortError, and your catch block dutifully runs:

UPDATE cloudflare_connections SET status = 'invalid', invalid_reason = ?
Enter fullscreen mode Exit fullscreen mode

Congratulations—a single transient network hiccup just permanently killed hourly syncing for the entire workspace until the user notices and reconnects.

The fix:

  • Isolate every site in its own try / catch inside the connection loop so one slow property never blocks the other ten.
  • Separate auth failures from transient failures. Only mark a connection invalid on genuine credential rejection (HTTP 401/403, revoked OAuth invalid_grant, or explicit invalid-token codes). On timeouts, 5xx, or rate limits (ThrottleIP), keep status = 'active' and back off the next retry by 10–60 minutes.

3. Never Compare a Half-Finished "Today" Against a Full Week

If you alert on "visitors dropped >40% week-over-week" using rolling timestamps that include today at 8:00 AM, your dashboard will cry wolf every morning.

Even trickier: if you switch a site to a newly installed tracker on Day 14, the previous 7-day window only has 6 days of data—creating a fake +16.7% spike (or a fake drop if the first day was partial).

The fix:

  • Always evaluate weekly deltas and drop alerts strictly on complete calendar days ending yesterday (yesterday - 6 through yesterday vs. yesterday - 13 through yesterday - 7) in the workspace's own timezone.
  • Suppress percentage-drop alerts on tiny baselines (e.g., < 50 visits/week or < 100 GSC impressions/week), where 3 fewer people looks like a 50% crash.

4. Indexation Checks Shouldn't Require Logging Into 12 GSC Tabs

Before you even look at Search Console, most indexation failures are caused by basic technical mismatches: a 301 chain, a stray x-robots-tag: noindex header, a canonical pointing somewhere else, a robots.txt rule, or a page missing from sitemap.xml.

I split that diagnostic engine out into a standalone, no-signup free tool: AllSites Google Index Checker. Paste any public URL and it checks:

  • Final HTTP status & redirect chain
  • robots.txt Googlebot-style matching
  • HTML meta + HTTP x-robots-tag directives
  • Canonical alignment
  • Sitemap presence
  • Visible text & JavaScript rendering risk
  • Simple homepage discovery link check

Try It or Poke Holes in the Stack

If you're juggling 3–40 small sites and want uptime, title-change monitoring, GSC/Bing, exact human visitors, and multi-provider revenue in one place, AllSites is live with a 7-day free trial (no card required)—or just bookmark the free Google Index Checker.

Happy to share more about running scheduled multi-tenant sync jobs on Cloudflare Workers + D1, handling GSC/Bing API quirks, or reconciling Dodo/Stripe/PayPal webhooks. What's the worst silent failure you've caught too late on your own sites?

Top comments (6)

Collapse
 
userxnom profile image
Abdullah Naseer •

The adaptive-sampling catch is the one that would have fooled me — exact multiples of 10 looking like clean data, while server logs showed 12–14 real people a day. Keeping RUM as a clearly labeled sampled fallback and preferring the under-2 KB first-party t.js counts once they exist is a sensible split. Bug 2 hit closest to home for me: one 21-second hang turning into a permanent invalid status is such an easy cron trap. Do you also retry a timed-out site sooner than the 10–60 minute backoff if the next hourly run is the one that would have caught a real outage?

Collapse
 
yan_gao_3ad90a90b26925538 profile image
Yan Gao •

Good catch — uptime checks and analytics syncs are completely decoupled. Uptime pings run on their own 5-minute schedule, so backing off a slow Cloudflare/Bing analytics sync for 10–60 minutes never delays catching a real outage.

Collapse
 
keyharbor profile image
Arthur | Keyharbor •

The distinction in bug 2 between auth failures and transient ones is the one I'd copy first. Marking a connection invalid only on 401/403 or invalid_grant, and backing off on timeouts and 5xx, avoids a lot of silent breakage. One extra suggestion: store a consecutive-failure count, and only surface 'needs reconnect' after several auth rejections across different runs, since some providers briefly return 403 during incidents. Also, are you running the per-site loops inside a single cron invocation, or fanning out via Queues? With 12 sites the subrequest limit may start to matter as the list grows.

Collapse
 
yan_gao_3ad90a90b26925538 profile image
Yan Gao •

Great point on counting consecutive auth rejections — adding a small threshold before surfacing "needs reconnect" would nicely guard against brief provider 403 blips. Right now it runs per-site isolated loops inside a single cron invocation (which fits comfortably inside Workers subrequest limits at ~12 sites), and moving to Queues or batched fan-out is the planned next step as multi-site workspaces grow.

Collapse
 
robertpaschal profile image
Odinaka Robert Nnamani •

The multiples-of-10 sampling bit is the one that would have fooled me. One slow site should not kill sync for the other eleven.

Collapse
 
yan_gao_3ad90a90b26925538 profile image
Yan Gao •

Exactly — exact multiples of 10 look deceptively clean until you cross-check them against server logs. Isolating each site's sync was such a relief once it went live.