Problem running ors docker on north-america-latest.osm.pbf

Hello,
I am using ors docker from GitHub - GIScience/openrouteservice: 🌍 The open source route planner api with plenty of features. . I opened 2 remote machines that run this docker - one is using a combined osm.pbf file of various europe countries, the other one uses north-america-latest.osm.pbf.
The docker running on europe osm file is running smoothly - I can send requests and get responses correctly. But the docker running on north america file returns errors and stops. These are some of the logs I receive (the waraning/error messages are repeating with different ids):

ors-app  | 2024-07-10 06:11:35 WARN                                            ORS-pl-car [ o.h.o.r.g.e.GraphProcessContext          ]   Cannot invoke "String.trim()" because "in" is null. Way id = 543991865
ors-app  | 2024-07-10 06:11:45 WARN                                            ORS-pl-car [ o.h.o.r.g.e.GraphProcessContext          ]   Cannot invoke "String.trim()" because "in" is null. Way id = 576931605
ors-app  | 2024-07-10 06:11:56 WARN                                            ORS-pl-car [ o.h.o.r.g.e.GraphProcessContext          ]   null. Way id = 628798571
ors-app  | 2024-07-10 06:11:56 WARN                                            ORS-pl-car [ o.h.o.r.g.e.GraphProcessContext          ]   null. Way id = 628818394
ors-app  | 2024-07-10 06:12:05 WARN                                            ORS-pl-car [ o.h.o.r.g.e.GraphProcessContext          ]   null. Way id = 667270499
ors-app  | 2024-07-10 06:14:38 WARN                                            ORS-pl-car [ o.h.o.r.g.e.GraphProcessContext          ]   null. Way id = 1064358230
ors-app  | 2024-07-10 06:14:38 WARN                                            ORS-pl-car [ o.h.o.r.g.e.GraphProcessContext          ]   null. Way id = 1064358231
ors-app  | 2024-07-10 06:14:38 WARN                                            ORS-pl-car [ o.h.o.r.g.e.GraphProcessContext          ]   null. Way id = 1064358232
ors-app  | 2024-07-10 06:15:00 WARN                                            ORS-pl-car [ c.g.r.u.FerrySpeedCalculator             ]   Unrealistic long duration ignored in way with way ID=1174688814 : Duration tag value=01:00 (=60 minutes)
ors-app  | 2024-07-10 06:15:00 WARN                                            ORS-pl-car [ c.g.r.u.FerrySpeedCalculator             ]   Unrealistic long duration ignored in way with way ID=1174688815 : Duration tag value=01:00 (=60 minutes).
ors-app  | 2024-07-10 06:49:37 INFO                                            ORS-pl-car [ o.h.o.r.g.e.ORSGraphHopper               ]   call cleanUp for '/home/ors/./graphs/car' 
ors-app  | 2024-07-10 06:49:37 INFO                                            ORS-pl-car [ o.h.o.r.g.e.ORSGraphHopper               ]   graph CH|car_ors|RAM_STORE|2D|turn_cost|7,20,5,4,5, details:edges:76 249 541(2618MB), nodes:59 864 030(914MB), name:(205MB), geo:365 139 744(1393MB), bounds:-180.0,-16.6222608,14.5326848,82.5254024, shortcuts:0 (1MB), nodesCH:-1 (1MB), shortcuts:0 (1MB), nodesCH:-1 (1MB), shortcuts:0 (1MB), nodesCH:-1 (1MB)
ors-ors-app exited with code 137



My docker-osm.yml :

# Docker Compose file for the openrouteservice (ORS) application
# Documentation and examples can be found on https://giscience.github.io/openrouteservice/run-instance/running-with-docker
version: '3.8'

services:
  # ----------------- ORS application configuration ------------------- #
  ors-app:
    # Activate the following lines to build the container from the repository
    # You have to add --build to the docker compose command to do so
    build:
      context: ./
    container_name: ors-app
    ports:
      - "80:80"  # Expose the ORS API on port 80
      - "9001:9001"  # Expose additional port for monitoring (optional)
    image: openrouteservice/openrouteservice:v8.0.0
    # Advanced option! If you different ids to 0:0 and 1000:1000, you have to rebuild the container with the build args UID,GID.
    # The user command is useful if you want easier bind mount access or better security.
    #user: "1000:1000" # Run "mkdir -p ors-docker/config ors-docker/elevation_cache ors-docker/files ors-docker/graphs ors-docker/logs && sudo chown -R 1000:1000 ors" before starting the container!
    volumes:  # Mount relative directories. ONLY for local container runtime. To switch to docker managed volumes see 'Docker Volumes configuration' section below.
      - ./ors-docker:/home/ors  # Mount the ORS application directory (for logs, graphs, elevation_cache, etc.) into its own directory
      #- ./graphs:/home/ors/graphs  # Mount graphs directory individually
      #- ./elevation_cache:/home/ors/elevation_cache  # Mount elevation cache directory individually
      #- ./config:/home/ors/config  # Mount configuration directory individually
      #- ./logs:/home/ors/logs  # Mount logs directory individually
      #- ./files:/home/ors/files  # Mount files directory individually
      - /media/osm/north-america-latest.osm.pbf:/home/ors/ors-core/data/osm_file.pbf

    environment:
      REBUILD_GRAPHS: True  # Set to True to rebuild graphs on container start.  Set to False if graphs are already created!!!!
      CONTAINER_LOG_LEVEL: WARNING  # Log level for the container. Possible values: DEBUG, INFO, WARNING, ERROR, CRITICAL
      # If you don't want the default ors-config.yml you can specify a custom file name, that should match the file in
      # your 'config' volume mount.
      ORS_CONFIG_LOCATION: /home/ors/config/ors-config.yml  # Location of your ORS configuration file in the docker container

      # ------------------ JAVA OPTS ------------------ #
      # Configure the memory settings for JAVA or pass additional opts
      # Fore more available ENV properties see Prepare CATALINA_OPTS and JAVA_OPTS
      # in https://github.com/GIScience/openrouteservice/blob/main/docker-entrypoint.sh
      XMS: 14g  # start RAM assigned to java
      XMX: 32g  # max RAM assigned to java. Rule of Thumb: <PBF-size> * <profiles> * 2
      # Example: 1.5 GB pbf size, two profiles (car and foot-walking)
      # -> 1.5 * 2 * 2 = 6. Set xmx to be AT LEAST `-Xmx6g`
      ADDITIONAL_JAVA_OPTS: ""  # further options you want to pass to the java command

      # ----------------- Properties configuration ------------------- #
      # Configure your whole container with only property ENVs.
      # These can be set alternatively or additionally to the yml configuration file.
      # Note, that any values set will override the corresponding values from the yml configuration file.
      # See the ors-config.env file for more options.
      # To have a configuration file-less container, uncomment at least the following properties.
      # The values are examples and provide the default configuration.
      #ors.engine.source_file: /home/ors/files/example-heidelberg.osm.gz
      #ors.engine.graphs_root_path: /home/ors/graphs
      #ors.engine.elevation.cache_path: /home/ors/elevation_cache
      #ors.engine.profiles.car.enabled: true

    # ----------------- ENV file configuration ------------------- #
    # Too many variables for your 'environment:' section?
    # Use an env_file with the ENV properties instead and define everything in there:
    # Values will be overwritten if set in the 'environment' section.
    #env_file: ors-config.env

    # ----------------- Healthcheck configuration ------------------- #
    # The healthcheck is disabled by default. Uncomment the following lines to enable it.
    # The healthcheck allows you to monitor the status of the ORS application.
    # Be careful with long graph builds, as the healthcheck will fail and show 'unhealthy' during this time.
    # This is especially useful if you run your ORS container in a production environment.
    #healthcheck:
    #  test: wget --no-verbose --tries=1 --spider http://localhost:8082/ors/v2/health || exit 1
    #  start_period: 1m
    #  interval: 10s
    #  timeout: 2s
    #  retries: 3
    #  disable: false

# ----------------- Docker Volumes configuration ------------------- #
# Define the Docker managed volumes for the ORS application. For more info on Docker Volumes see https://docs.docker.com/compose/compose-file/07-volumes/
# Volumes are used to persist the data and configuration of the ORS application.
# If you want to use volumes, uncomment the following lines and remove the ./ prefix from the volume paths in 'services.ors-app.volumes'.
#volumes:
#    graphs:
#    elevation_cache:
#    config:
#    logs:
#    files:

What might be the issue?
I would really appreciate your help.
Thank you very much,
Albert Iancu

Hey,

the java errors you’re getting are all Warnings.
The one error that happens is

which suggests that it ran out of RAM.
north-america-latest is 14.5GB, so given the rule of thumb, 32 GB might not even suffice for 1 profile.

Best regards.

Hi,
I tried to run with an older version of north-america-latest.osm.pbf that is 12.3 GB and it’s also not running. The western europe file is 14.3 GB and it’s working fine with the same configuration (32GB RAM).
All the configurations in both servers are identical - except the osm file.

I also created osm file of only us and canda (13.9 GB) and it is also not working.

I am not getting those warning on the other server that is running with western europe osm file