Skip to content

fix(aviation): route NOTAM through Railway relay to fix timeout - #599

Merged
koala73 merged 1 commit into
mainfrom
fix/aviation-mena-visibility
Feb 28, 2026
Merged

koala73 merged 1 commit into
mainfrom
fix/aviation-mena-visibility

Conversation

@koala73

@koala73 koala73 commented Feb 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • ICAO NOTAM API times out from Vercel edge (>10s) — confirmed in logs: NOTAM batch 1: The operation was aborted due to timeout
  • Added /notam proxy endpoint to Railway relay (25s timeout, 30min local cache)
  • fetchNotamClosures now routes through relay when WS_RELAY_URL is set, falls back to direct call (20s timeout)
  • Added logging to distinguish real AviationStack alerts vs simulation in cache hits

Deployment steps

  1. Merge this PR
  2. Add ICAO_API_KEY env var to Railway relay (same value as Vercel)
  3. Railway redeploys automatically
  4. Check relay logs for [Relay] NOTAM: entries

Also check

  • Is AVIATIONSTACK_API env var set on Vercel? If not, all intl alerts are simulation (random)
  • After this fix, NOTAM will catch real closures for MENA airports even without AviationStack

Test plan

  • npx tsc --noEmit passes
  • node -c scripts/ais-relay.cjs passes
  • Deploy → check Vercel logs for NOTAM: fetching via relay
  • Check Railway relay logs for [Relay] NOTAM:
  • MENA airports with active NOTAMs should show closure alerts

Root cause: ICAO NOTAM API times out from Vercel edge (>10s).
AviationStack alerts indistinguishable from simulation in logs.

Changes:
- Add /notam proxy endpoint to Railway relay (25s timeout, 30min cache)
- Route fetchNotamClosures through relay when WS_RELAY_URL is set
- Fall back to direct ICAO call (20s timeout) when no relay
- Log cache hits with real vs simulated alert counts
- Send all MENA airports in single NOTAM request (was batched by 20)

Requires: ICAO_API_KEY env var on Railway relay
@vercel

vercel Bot commented Feb 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
worldmonitor Building Building Preview, Comment Feb 28, 2026 9:23pm
worldmonitor-finance Building Building Preview, Comment Feb 28, 2026 9:23pm
worldmonitor-happy Building Building Preview, Comment Feb 28, 2026 9:23pm
worldmonitor-startup Building Building Preview, Comment Feb 28, 2026 9:23pm

Request Review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@koala73
koala73 merged commit 333c98e into main Feb 28, 2026
6 checks passed
koala73 added a commit that referenced this pull request Mar 1, 2026
Root cause: ICAO NOTAM API times out from Vercel edge (>10s).
AviationStack alerts indistinguishable from simulation in logs.

Changes:
- Add /notam proxy endpoint to Railway relay (25s timeout, 30min cache)
- Route fetchNotamClosures through relay when WS_RELAY_URL is set
- Fall back to direct ICAO call (20s timeout) when no relay
- Log cache hits with real vs simulated alert counts
- Send all MENA airports in single NOTAM request (was batched by 20)

Requires: ICAO_API_KEY env var on Railway relay
matthewvecchione1-ops pushed a commit to matthewvecchione1-ops/worldmonitor that referenced this pull request Mar 4, 2026
…a73#599)

Root cause: ICAO NOTAM API times out from Vercel edge (>10s).
AviationStack alerts indistinguishable from simulation in logs.

Changes:
- Add /notam proxy endpoint to Railway relay (25s timeout, 30min cache)
- Route fetchNotamClosures through relay when WS_RELAY_URL is set
- Fall back to direct ICAO call (20s timeout) when no relay
- Log cache hits with real vs simulated alert counts
- Send all MENA airports in single NOTAM request (was batched by 20)

Requires: ICAO_API_KEY env var on Railway relay
@koala73
koala73 deleted the fix/aviation-mena-visibility branch March 4, 2026 19:40

This branch was successfully deployed

4 active deployments
Preview – worldmonitor-startup — 2f2e6ae4 Deployed Feb 28, 2026 by vercel[bot]
Preview – worldmonitor-finance — 2f2e6ae4 Deployed Feb 28, 2026 by vercel[bot]
Preview – worldmonitor — 2f2e6ae4 Deployed Feb 28, 2026 by vercel[bot]
Preview – worldmonitor-happy — 2f2e6ae4 Deployed Feb 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant