fragJulia
Changelog

2026-11-21 — Production outage from the start-up env check; check made non-fatal

The start-up check added on 2026-11-19 threw in production because NEXT_PUBLIC_SITE_URL was unset. Every server-rendered route on www.fragjulia.de failed from the first deployment that built with it until this fix. The check now only logs.

What happened

  • apps/web/instrumentation.ts (added in the 2026-11-19 go-live tranche) threw at server start in production when NEXT_PUBLIC_SITE_URL was missing.
  • The variable is not set in Vercel Production. The first production deployment that contained the check and built successfully was created 2026-11-21 01:45 UTC (merge of #714); the deployment of #713 had failed to build, so the previous version stayed live until then.
  • From then on, every request that needed a server function on www.fragjulia.de failed with An error occurred while loading instrumentation hook: [env] required variables missing: NEXT_PUBLIC_SITE_URL (Vercel runtime log, routes /magazin/*, /lexikon/*, /s/faq). Prerendered pages served from the CDN were not affected. The number of failed requests was not measured.
  • Found 2026-11-21 ~13:45 UTC while reading runtime logs for an unrelated check. Duration until then: about 12 hours.

Cause

The check treated NEXT_PUBLIC_SITE_URL as required and fatal, although every reader of the variable has a default (https://fragjulia.de, e.g. apps/web/lib/stripe.ts:41). The check was never run against the variables Production actually has. The Vercel environment was listed as "not inspected" in the go-live map, and a fatal check should not have shipped against an uninspected environment.

Fix

  • instrumentation.ts never throws. Missing Supabase variables are logged with console.error, everything else with console.warn. NEXT_PUBLIC_SITE_URL moved to the warning list.
  • Verified locally: next build and next start with NODE_ENV=production and the variable unset; /impressum, /magazin, /lexikon/grading, /robots.txt answer 200, the 12 warnings are logged, no start-up error.

Resolved

Merged as #717; production deployment dpl_RADjrWjWefrVpTZ7kEyorwhizhvJ ready 2026-11-21 14:00 UTC. https://www.fragjulia.de/lexikon/grading (a route that was failing) answers 200 from a server function at 14:03 UTC. Total duration about 12 hours 15 minutes.

Still open (owner)

  • Set NEXT_PUBLIC_SITE_URL in Vercel for Production and Preview. Without it, Preview deployments send Stripe redirects and e-mail links to the production domain.
  • The same runtime log shows these Production variables unset: CRON_SECRET, KV_REST_API_URL, KV_REST_API_TOKEN, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_PRICE_PLUS_MONTHLY, STRIPE_PRICE_PREMIUM_MONTHLY, RESEND_API_KEY, HMAC_SECRET, AWS_ACCESS_KEY_ID, S3_DOCUMENTS_BUCKET, DOCUMENT_PIPELINE_V2_ROLLOUT_PCT. Consequence according to the code (not observed live): chat and every other rate-limited route answer 429 (apps/web/lib/rate-limit.ts:88-95), no checkout, no transactional mail.
  • No uptime or error alerting exists (go-live map A13b). This outage was found by accident.

On this page