Skip to content

Hotfix: turn the geo block off by default after it took the site down - #36

Merged
lbesecker195 merged 1 commit into
mainfrom
hotfix/disable-geo-block
Sep 19, 2026
Merged

lbesecker195 merged 1 commit into
mainfrom
hotfix/disable-geo-block

Conversation

@lbesecker195

Copy link
Copy Markdown
Owner

Production outage after #35. Loading the DB-IP city database cost ~179MB resident, which the box could not carry alongside Postgres.

Symptom: every database-backed route hung (30s timeouts on /, /servers, /submit, /llms.txt, /api/v0/servers), while /nope — the one route that touches no database — kept answering 301. The deploy's own smoke test passed at 16:38, because locus downloads and decodes the database in the background after boot.

Fix: the rule is now gated behind GEO_BLOCK_ENABLED=true, so no deploy loads the database unless someone opts in. The plug, the matching rules and their tests stay — the code is correct; the footprint is what the host cannot take.

The 301 redirect work from #32 is unaffected and stays live.

Re-enabling wants one of:

  • more RAM on the box, or
  • the lookup moved out of the app VM (a Cloudflare firewall rule does city blocking with no app memory at all), or
  • an IP/CIDR allowlist, if the real target is a specific actor rather than a geography.

Pages affected:

🤖 Generated with Claude Code

Loading the city database cost about 179MB resident, which the production box
could not carry alongside Postgres. Every database-backed route hung while
/nope -- the only route touching no database -- kept answering, so the symptom
read as a partial outage rather than a crash.

- Gate the rule behind GEO_BLOCK_ENABLED=true, so a deploy no longer loads the
  database unless someone opts in
- Leave the plug, the matching rules and their tests in place; the code is
  correct, it is the memory footprint that the host cannot take

The 301 redirect work is unaffected and stays live.

---

Pages affected:

- [MCP Registry](https://ai.mcpharbor.dev/) — home page, restored by this change.
- [Browse MCP servers](https://ai.mcpharbor.dev/servers) — the catalogue, restored by this change.
- [JSON API](https://ai.mcpharbor.dev/api/v0/servers) — machine-readable listings.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lbesecker195
lbesecker195 merged commit 75a2013 into main Sep 19, 2026
@lbesecker195
lbesecker195 deleted the hotfix/disable-geo-block branch September 19, 2026 16:51
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