Truncate noisy build-failure output, fix the recurring terrain death
The web UI was showing a raw ~500k-character stdout/stderr dump on a failed build — go-pmtiles' extract logs one progress line per chunk, which is fine on a terminal (it overwrites itself) but not captured non-interactively. command_output now keeps just the tail, and the status line renders it with preserved line breaks in a scrollable box instead of one unreadable blob. Root cause of the actual failure (terrain build dying ~11 minutes in with an HTTP/2 stream reset): go-pmtiles' default --overfetch=0.05 merged this multi-country planet.pmtiles extract into a single ~60GB request with no way to resume after a dropped stream. --overfetch=0 splits it into many smaller requests instead.
This commit is contained in:
1 parent
237e5b2e54
commit
f18e5c19d3
5 files changed
+92
-13
No files matched your search
+12
-2
@@ -71,13 +71,23 @@ and similar, varying by region):
|
||||
|
||||
[source,shell]
|
||||
----
|
||||
pmtiles extract https://download.mapterhorn.com/planet.pmtiles planet-extract.pmtiles --bbox=west,south,east,north --maxzoom=15
|
||||
pmtiles extract https://download.mapterhorn.com/planet.pmtiles planet-extract.pmtiles --bbox=west,south,east,north --maxzoom=15 --overfetch=0
|
||||
# only if a regional chunk covers the bbox too (see download_urls.json) —
|
||||
# most bboxes hit exactly one, a bbox straddling a chunk boundary hits two:
|
||||
pmtiles extract https://download.mapterhorn.com/<chunk>.pmtiles chunk-extract.pmtiles --bbox=west,south,east,north --maxzoom=15
|
||||
pmtiles extract https://download.mapterhorn.com/<chunk>.pmtiles chunk-extract.pmtiles --bbox=west,south,east,north --maxzoom=15 --overfetch=0
|
||||
pmtiles merge planet-extract.pmtiles chunk-extract.pmtiles data/terrain.pmtiles
|
||||
----
|
||||
|
||||
`--overfetch=0`: the default (0.05) merges nearby byte ranges into fewer,
|
||||
bigger requests to save round-trips — for `planet.pmtiles` (global z0-12,
|
||||
tens of GB) over a bbox spanning several countries this can collapse the
|
||||
whole extract into a *single* multi-GB request with no way to resume after
|
||||
a mid-transfer HTTP/2 stream reset. `--overfetch=0` trades that one
|
||||
fragile mega-request for many small ones instead (spread over
|
||||
`--download-threads`, default 4) — slower end to end, but a dropped
|
||||
connection only loses one small request's worth of progress, not the
|
||||
whole extract.
|
||||
|
||||
Tiles are 512px WebP, not the 256px PNG this app's *online* Terrarium
|
||||
source uses — `public/js/dem.js`'s own point-elevation lookups
|
||||
(`shadow.js`'s terrain-shadow overlay) read the actual decoded tile
|
||||
|
||||
Reference in new issue
Block a user