gis-ops / docker-valhalla

This is our flexible Docker repository for the Valhalla routing engine
MIT License
240 stars 70 forks source link

Crash on the valhalla_build_tiles command #23

Closed ysainson closed 3 years ago

ysainson commented 3 years ago

Hi,

I am trying to run docker with the latest package : docker.pkg.github.com/gis-ops/docker-valhalla/valhalla:latest, but experiencing a Killed on the valhalla_build_tiles command.

valhalla_1  | =========================
valhalla_1  | = Build the tile files. =
valhalla_1  | =========================
valhalla_1  | Running build tiles with: /custom_files/valhalla.json  /custom_files/france-latest.osm.pbf
valhalla_1  | 2021/06/10 05:32:08.961617 [INFO] Start stage = initialize End stage = cleanup
valhalla_1  | 2021/06/10 05:32:08.965249 [INFO] Parsing files for ways: /custom_files/france-latest.osm.pbf
valhalla_1  | 2021/06/10 05:32:08.966496 [INFO] Parsing ways...
valhalla_1  | 2021/06/10 05:38:31.938237 [INFO] invalid_argument thrown for condition  Apr-Sep Su[1] 11:00-18:00)
valhalla_1  | 2021/06/10 05:38:35.904393 [INFO] invalid_argument thrown for condition  Apr-Sep Su[1] 11:00-18:00)
valhalla_1  | 2021/06/10 05:38:35.908095 [INFO] invalid_argument thrown for condition  Apr-Sep Su[1] 11:00-18:00)
valhalla_1  | 2021/06/10 05:38:35.909826 [INFO] invalid_argument thrown for condition  Apr-Sep Su[1] 11:00-18:00)
valhalla_1  | 2021/06/10 05:38:35.995299 [INFO] invalid_argument thrown for condition  Apr-Sep Su[1] 11:00-18:00)
valhalla_1  | 2021/06/10 05:38:35.997370 [INFO] invalid_argument thrown for condition  Apr-Sep Su[1] 11:00-18:00)
valhalla_1  | 2021/06/10 05:39:51.735770 [INFO] Finished with 8285521 routable ways containing 86906013 nodes
valhalla_1  | 2021/06/10 05:39:51.771756 [INFO] Sorting osm access tags by way id...
valhalla_1  | 2021/06/10 05:39:51.804040 [INFO] Finished
valhalla_1  | 2021/06/10 05:39:51.806412 [INFO] Parsing files for relations: /custom_files/france-latest.osm.pbf
valhalla_1  | 2021/06/10 05:39:51.807242 [INFO] Parsing relations...
valhalla_1  | 2021/06/10 05:42:47.170260 [INFO] Finished with 55763 simple restrictions
valhalla_1  | 2021/06/10 05:42:47.170301 [INFO] Finished with 0 lane connections
valhalla_1  | 2021/06/10 05:42:47.171204 [INFO] Sorting complex restrictions by from id...
valhalla_1  | 2021/06/10 05:42:47.175004 [INFO] Sorting complex restrictions by to id...
valhalla_1  | 2021/06/10 05:42:47.176236 [INFO] Finished
valhalla_1  | 2021/06/10 05:42:47.177989 [INFO] Parsing files for nodes: /custom_files/france-latest.osm.pbf
valhalla_1  | 2021/06/10 05:42:47.178676 [INFO] Sorting osm way node references by node id...
valhalla_1  | 2021/06/10 05:44:03.845759 [INFO] Parsing nodes...
valhalla_1  | 2021/06/10 05:48:30.476969 [INFO] Finished with 75070262 nodes contained in routable ways
valhalla_1  | 2021/06/10 05:48:30.477374 [INFO] Sorting osm way node references by way index and node shape index...
valhalla_1  | 2021/06/10 05:49:38.106820 [INFO] Finished: max_osm_id 8818901822
valhalla_1  | 2021/06/10 05:49:38.108190 [INFO] Number of nodes with refs (exits) = 4351
valhalla_1  | 2021/06/10 05:49:38.108204 [INFO] Number of nodes with exit_to = 821
valhalla_1  | 2021/06/10 05:49:38.108213 [INFO] Number of nodes with names = 5281
valhalla_1  | 2021/06/10 05:49:38.108222 [INFO] Number of way refs = 0
valhalla_1  | 2021/06/10 05:49:38.108231 [INFO] Number of reverse way refs = 0
valhalla_1  | 2021/06/10 05:49:38.108240 [INFO] Unique Node Strings (names, refs, etc.) = 4980
valhalla_1  | 2021/06/10 05:49:38.108249 [INFO] Unique Strings (names, refs, etc.) = 751396
valhalla_1  | 2021/06/10 05:49:38.123376 [INFO] Creating graph edges from ways...
valhalla_1  | 2021/06/10 05:49:49.404449 [INFO] Finished with 16322811 graph edges
valhalla_1  | 2021/06/10 05:49:49.468611 [INFO] Sorting graph...
valhalla_1  | 2021/06/10 05:50:18.028046 [INFO] Nodes processed. Sorting begin and end nodes by edge.
valhalla_1  | 2021/06/10 05:50:24.186046 [INFO] Sorting begin and end nodes done. Populating edges...
valhalla_1  | 2021/06/10 05:50:25.690208 [INFO] Finished with 12772581 graph nodes
valhalla_1  | 2021/06/10 05:50:25.826742 [INFO] Writing tile manifest to /valhalla/scripts/valhalla_tiles/tile_manifest.json
valhalla_1  | 2021/06/10 05:50:25.828299 [INFO] Reclassifying link graph edges...
valhalla_1  | 2021/06/10 05:50:29.072750 [INFO] Class: 0 exit count = 4186
valhalla_1  | 2021/06/10 05:50:29.073302 [INFO] Class: 1 exit count = 5342
valhalla_1  | 2021/06/10 05:50:29.073313 [INFO] Class: 2 exit count = 11700
valhalla_1  | 2021/06/10 05:50:29.073321 [INFO] Class: 3 exit count = 9525
valhalla_1  | 2021/06/10 05:50:29.073326 [INFO] Class: 4 exit count = 6215
valhalla_1  | 2021/06/10 05:50:29.073332 [INFO] Class: 5 exit count = 1691
valhalla_1  | 2021/06/10 05:50:29.073341 [INFO] Class: 6 exit count = 1247
valhalla_1  | 2021/06/10 05:50:29.073350 [INFO] Class: 7 exit count = 0
valhalla_1  | 2021/06/10 05:50:42.943494 [INFO] Finished with 46166 reclassified.  Turn channel count = 18428
valhalla_1  | 2021/06/10 05:50:43.010034 [INFO] Reclassifying ferry connection graph edges...
valhalla_1  | 2021/06/10 05:50:50.304973 [INFO] Finished ReclassifyFerryEdges: ferry_endpoint_count = 88, 2675 edges reclassified.
valhalla_1  | 2021/06/10 05:50:50.506924 [INFO] Building 1220 tiles with 8 threads...
valhalla_1  | 2021/06/10 05:50:50.805447 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.805489 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.805569 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.805569 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.805613 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.805613 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.805624 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.805785 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.852127 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.852145 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.853038 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.853051 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.853192 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.853355 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.853491 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 05:50:50.853541 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 06:10:47.612875 [WARN] Restrictions mask exceeds allowable limit on wayid: 934453697
valhalla_1  | 2021/06/10 06:10:47.615176 [WARN] Restrictions mask exceeds allowable limit: 2043
valhalla_1  | 2021/06/10 06:10:47.644947 [WARN] Restrictions mask exceeds allowable limit on wayid: 938452979
valhalla_1  | 2021/06/10 06:10:47.645059 [WARN] Restrictions mask exceeds allowable limit: 2046
valhalla_1  | 2021/06/10 06:10:47.679819 [WARN] Restrictions mask exceeds allowable limit on wayid: 934453690
valhalla_1  | 2021/06/10 06:10:47.680050 [WARN] Restrictions mask exceeds allowable limit: 2043
valhalla_1  | 2021/06/10 06:10:56.357489 [WARN] Restrictions mask exceeds allowable limit on wayid: 934453694
valhalla_1  | 2021/06/10 06:10:56.357998 [WARN] Restrictions mask exceeds allowable limit: 2045
valhalla_1  | 2021/06/10 06:10:56.358676 [WARN] Restrictions mask exceeds allowable limit on wayid: 934453698
valhalla_1  | 2021/06/10 06:10:56.358696 [WARN] Restrictions mask exceeds allowable limit: 2039
valhalla_1  | 2021/06/10 06:20:12.667880 [INFO] Finished
valhalla_1  | 2021/06/10 06:20:12.682536 [INFO] Node Count = 12772581
valhalla_1  | 2021/06/10 06:20:12.682552 [INFO] Directed Edge Count = 32645622
valhalla_1  | 2021/06/10 06:20:12.682560 [INFO] EdgeInfo Count = 16444072
valhalla_1  | 2021/06/10 06:20:12.682814 [INFO] Enhancing local graph...
valhalla_1  | 2021/06/10 06:20:12.959920 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 06:20:12.959916 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 06:20:12.959943 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 06:20:12.959953 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 06:20:12.959931 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 06:20:12.959931 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 06:20:12.960023 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 06:20:12.960217 [INFO] SpatiaLite loaded as an extension
valhalla_1  | 2021/06/10 06:20:25.458585 [WARN] Exceeding maximum.  Average speed: 163
valhalla_1  | 2021/06/10 06:20:25.460749 [WARN] Exceeding maximum.  Average speed: 163
valhalla_1  | /valhalla/scripts/configure_valhalla.sh: line 272:  2750 Killed                  valhalla_build_tiles -c ${config_file} ${files}
valhalla_1 exited with code 1

Everything else was built correcly.

Here is my docker-compose.yaml

version: "3.0"
services:
  valhalla:
    image: docker.pkg.github.com/gis-ops/docker-valhalla/valhalla
    ports:
      - "8002:8002"
    volumes:
      - ./custom_files/:/custom_files
    environment:
      - tile_urls=https://download.geofabrik.de/europe/france-latest.osm.pbf
      - min_x=-5.45
      - min_y=41.26
      - max_x=9.87
      - max_y=51.27
      - use_tiles_ignore_pbf=True
      - force_rebuild=False
      - force_rebuild_elevation=False
      - build_elevation=True
      - build_admins=True
      - build_time_zones=True

System

MacBook Pro (16-inch, 2019), macOS Big Sur version 11.14 Docker version 20.10.6, build 370c289

nilsnolde commented 3 years ago

Hm, looks like memory issues to me. Can you try a docker stats valhalla to see the max memory it's allowed to use? You can generously set it to all available memory with mem_limit: 16g (or whatever) in the docker-compose.

nilsnolde commented 3 years ago

Uff you're the very first one to pull the image from Github.. hope it's not jinxed ;)

ysainson commented 3 years ago

Docker Desktop was set to 2GB... Working better with 16! Thanks for helping 😄