From 020f3275036e2047602307ce3eed16444a9c331f Mon Sep 17 00:00:00 2001 From: Till JS Date: Sat, 11 Apr 2026 17:41:57 +0200 Subject: [PATCH] fix(geocoding): drop unused Pelias services, raise Bun idleTimeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two production follow-ups surfaced after the deploy: 1. Pelias API was emitting continuous `ENOTFOUND placeholder`, `pip`, `interpolation` errors because we declared those services in pelias.json but never actually run them (we don't need WOF admin lookup or street interpolation for the DACH use case). Removed the stale entries — Pelias degrades cleanly to libpostal-only parsing, which is what we want. 2. Bun.serve's default idleTimeout is 10s, which is too tight for cold Pelias queries hitting Elasticsearch. Raise to 60s so first-query-after-idle doesn't get cut off. Co-Authored-By: Claude Opus 4.6 (1M context) --- services/mana-geocoding/pelias/pelias.json | 9 --------- services/mana-geocoding/src/index.ts | 4 ++++ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/services/mana-geocoding/pelias/pelias.json b/services/mana-geocoding/pelias/pelias.json index 0e8ee3ea3..b06280455 100644 --- a/services/mana-geocoding/pelias/pelias.json +++ b/services/mana-geocoding/pelias/pelias.json @@ -12,15 +12,6 @@ "services": { "libpostal": { "url": "http://libpostal:4400" - }, - "placeholder": { - "url": "http://placeholder:4100" - }, - "pip": { - "url": "http://pip:4200" - }, - "interpolation": { - "url": "http://interpolation:4300" } }, "defaultParameters": {} diff --git a/services/mana-geocoding/src/index.ts b/services/mana-geocoding/src/index.ts index 905ce3285..d4833e728 100644 --- a/services/mana-geocoding/src/index.ts +++ b/services/mana-geocoding/src/index.ts @@ -16,5 +16,9 @@ console.log(`Pelias API: ${config.pelias.apiUrl}`); export default { port: config.port, + // Bun's default idleTimeout is 10s — too tight for Pelias cold queries + // that need to hit Elasticsearch and libpostal. 60s is generous enough + // for the worst-case while still cutting off stuck connections. + idleTimeout: 60, fetch: createApp(config).fetch, };