Trail editor: "Couldn't reach the pace engine" (POST /api/v1/trail-analyze/analyze -> 504 after 120 s) #47
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
public/wanderer#47
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported by Jörg 2026-11-04 ~18:55Z on https://wanderer.bearoverse.com/trail/edit/new (Firefox).
Repro: new trail, set two points (valhalla route + height succeed: POST /api/v1/valhalla/route 200, /api/v1/valhalla/height 200), then the editor calls
POST /api/v1/trail-analyze/analyze, which hangs and returns 504 after 120085 ms. UI: "Couldn't reach the pace engine." Console:Error: analyze failed (504).Other calls OK: /api/v1/list, /api/v1/plugin-system/plugins, /api/v1/plugin-instance, geocoding/reverse, styles/komoot.json.
To find: which backend serves trail-analyze (pace engine service/plugin), whether it runs and is reachable from the wanderer web pod (NetworkPolicy, DNS, service name after the k3s/Sospel moves), its logs, and the 120 s gateway timeout.
🤖 Generated with Claude Code
Root cause (504 "Couldn't reach the pace engine")
The request path itself was fine: wanderer-web
/api/v1/trail-analyze/analyze→trail-analyze-web(nginx) →elevation-profiler:8000, all on the Monaco k3s, no NetworkPolicy involved, DNS fine. The engine was simply too slow:IGNF_MNT-LIDAR-HD:dalle. Every LiDAR tile lookup now answers 400 "Unknown namespace [IGNF_MNT-LIDAR-HD]".ANALYZE_TIMEOUT_MS) and nginx (proxy_read_timeout 120s). nginx logged 499 at exactly 120 s.Fix
jmz/homelab-flux#819 (CI green, waiting for Jörg's merge). Dalles now come straight from the WMS layer
IGNF_LIDAR-HD_MNT_ELEVATION.ELEVATIONGRIDCOVERAGE.LAMB93, which returns pixels identical to the cached tiles. Each tile gets one fetch attempt per analysis, error responses are closed, 4xx are not retried, and the timeout is 20 s per attempt. A pod annotation rolls the profiler.Tested in the live pod with the new code: Sospel → Col de Braus (7.6 km) took 0.9 s cold, Monaco → La Turbie took 1.2 s, lidar_pct 100 / 99.8.
Browser-log follow-ups
#48 into
deploy(CI green; needs jmz to merge becausedeployis protected, then an image build and a flux digest bump):/trail/edit/<unknown id>(the devtools source-map probe) → 4xxisMapStyleLoadedguardgetElementById("")→ no emptylabel forisomorphic-xml2jsdist/lib/parser.js:12(an intentional'INVALID'probe at load), harmlessuser-select: undefined: upstream maplibre-glsrc/util/dom.ts:90-92(enableDragwithout a priordisableDrag), harmlessfile:///security error: devtools extension, no app reference/trail/edit/new: SvelteKit ETag revalidation, expected-moz-*/-webkit-*warnings: Tailwind and maplibre-gl.css vendor prefixes, harmlessI'll close this once #819 is deployed and the analyze call is verified.
🤖 Generated with Claude Code
Verified live 2026-11-04 21:15Z after homelab-flux #819 (elevation-profiler on the LiDAR-HD WMS layer, no retry storm): POST /analyze 200 in 0.7-1.5 s on 3 routes (sospel-braus 7.6 km lidar 100 %, sospel-ventabren 4.7 km 99.8 %, monaco-turbie 3.6 km 99.8 %), was 504 after 120 s. Closing. The browser-log items continue in public/wanderer#48.
🤖 Generated with Claude Code