RAM size of more than 2*size of pbf file is not enough for self hosted docker instance

I have installed openrouteservice in a docker container on ubuntu26.04 with 32GB RAM. The size of my pbf file is 9,5GB. I build only one profile (driving-car) without elevation, memory mapping is turned on. During the build process the container needs more than 32GB and crashes.

I can’t find an error message in the log file.

Here is the output of the logfile:

#################

Container ENV

#################
e[32m✓ CONTAINER_LOG_LEVEL: DEBUG. Set CONTAINER_LOG_LEVEL=DEBUG for more details.e[0m
e[36m▢ ors.engine.profile_default.build.source_file=files/merged.pbfe[0m
e[36m▢ ors.engine.graphs_data_access=MMAPe[0m
e[36m▢ XMX=32ge[0m
e[36m▢ XMS=16ge[0m
e[36m▢ CONTAINER_LOG_LEVEL=DEBUGe[0m
e[36m▢ HOSTNAME=35f1dc704cece[0m
e[36m▢ LANGUAGE=en_USe[0m
e[36m▢ JAVA_HOME=/usr/lib/jvm/default-jvme[0m
e[36m▢ REBUILD_GRAPHS=truee[0m
e[36m▢ PWD=/home/orse[0m
e[36m▢ HOME=/roote[0m
e[36m▢ LANG=en_USe[0m
e[36m▢ BUILD_GRAPHS=Falsee[0m
e[36m▢ TERM=xterme[0m
e[36m▢ SHLVL=1e[0m
e[36m▢ LC_ALL=en_USe[0m
e[36m▢ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/default-jvm/bine[0m
e[36m▢ ORS_HOME=/home/orse[0m
e[36m▢ _=/usr/bin/enve[0m
e[34mⓘ Any config file settings can be overwritten by environment variables.e[0m
e[34mⓘ Use ‘CONTAINER_LOG_LEVEL=DEBUG’ to see the full list of active environment variables for this container.e[0m
###########################

Container sanity checks

###########################
e[34mⓘ Running container as user root with id 0 and group 0e[0m
e[36m▢ User and group are set to root with id 0 and group 0.e[0m
e[32m✓ ORS_HOME: /home/ors exists and is writable.e[0m
e[36m▢ Populated ORS_HOME=/home/ors with the default folders: files, logs, graphs, elevation_cache, confige[0m
e[36m▢ ors.engine.profile_default.graph_path= is set and not empty and not set to /e[0m
e[36m▢ ors.engine.elevation.cache_path= is set and not empty and not set to /e[0m
e[32m✓ The file /home/ors/config/example-ors-config.env is up to datee[0m
e[32m✓ The file /home/ors/config/example-ors-config.yml is up to datee[0m
e[32m✓ Using the existing ors-config.yml from: /home/ors/config/ors-config.ymle[0m
e[34mⓘ Default to graphs folder: /home/ors/graphse[0m
e[36m▢ OSM source file set to files/merged.pbfe[0m
e[34mⓘ Any ENV variables will have precedence over configuration variables from config files.e[0m
e[32m✓ All checks passed. For details set CONTAINER_LOG_LEVEL=DEBUG.e[0m
#####################################

Container file system preparation

#####################################
e[36m▢ Changed ownership of /home/ors to roote[0m
chmod: g+rwX: No such file or directory
e[36m▢ Changed permissions of /home/ors to user and group read/write/executee[0m
e[32m✓ The file /home/ors/files/example-heidelberg.test.pbf is up to datee[0m
e[32m✓ Removed graphs at /home/ors/graphs/*.e[0m
e[32m✓ Container file system preparation complete. For details set CONTAINER_LOG_LEVEL=DEBUG.e[0m
#######################################

Prepare CATALINA_OPTS and JAVA_OPTS

#######################################
e[36m▢ CATALINA_OPTS: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost e[0m
e[36m▢ JAVA_OPTS: -Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms16g -Xmx32g e[0m
e[32m✓ CATALINA_OPTS and JAVA_OPTS ready. For details set CONTAINER_LOG_LEVEL=DEBUG.e[0m
#####################

ORS startup phase

#####################
e[32m✓ 🙭 Ready to start the ORS application 🙭e[0m
e[36m▢ Startup command: java -Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms16g -Xmx32g -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9001 -Dcom.sun.management.jmxremote.rmi.port=9001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=localhost -jar /ors.jare[0m

. ____ _ __ _ _
/\ / __ _ () __ __ _ \ \ \
( ( )__ | '_ | '| | ’ / ` | \ \ \
\/ )| |
)| | | | | || (| | ) ) ) )
’ || .__|| ||| |_, | / / / /
=========|
|==============|/=////

e[32m :: Spring Boot :: e[39m e[2m (v3.5.7)e[0;39m

2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.Application ]e[m Starting Application v9.9.0 using Java 21.0.9 with PID 1 (/ors.jar started by root in /home/ors)
2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.Application ]e[m The following 1 profile is active: “default”
2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.ORSEnvironmentPostProcessor ]e[m
2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.ORSEnvironmentPostProcessor ]e[m Configuration lookup started.
2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.ORSEnvironmentPostProcessor ]e[m ORS config file found at: /home/ors/config/ors-config.yml
2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.ORSEnvironmentPostProcessor ]e[m Configuration file set by environment variable.
2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.ORSEnvironmentPostProcessor ]e[m Loaded file ‘/home/ors/config/ors-config.yml’.
2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.ORSEnvironmentPostProcessor ]e[m
2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.ORSEnvironmentPostProcessor ]e[m Environment variables overriding openrouteservice configuration parameters detected:
2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.ORSEnvironmentPostProcessor ]e[m ors.config.location=/home/ors/config/ors-config.yml
2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.ORSEnvironmentPostProcessor ]e[m Configuration lookup finished.
2026-05-06 17:15:52 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.ORSEnvironmentPostProcessor ]e[m
2026-05-06 17:16:01 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.s.EngineService ]e[m Initializing ORS…
2026-05-06 17:16:01 e[32mINFO e[m e[36m ORS-Inite[m e[1;36m[ o.h.o.r.RoutingProfileManager ]e[m Total: 16 GB, Free: 15.90 GB, Max: 32 GB, Used: 97.61 MB
2026-05-06 17:16:01 e[32mINFO e[m e[36m ORS-Inite[m e[1;36m[ o.h.o.r.RoutingProfileManager ]e[m ====> Initializing 1 profiles (1 threads) …
2026-05-06 17:16:01 e[32mINFO e[m e[36m ORS-Inite[m e[1;36m[ o.h.o.r.RoutingProfileManager ]e[m 1 profile configurations submitted as tasks.
2026-05-06 17:16:02 e[33mWARN e[m e[36m ORS-pl-driving-care[m e[1;36m[ o.h.o.r.g.e.ORSGraphHopperConfig ]e[m Elevation is set to false.
2026-05-06 17:16:02 e[33mWARN e[m e[36m ORS-pl-driving-care[m e[1;36m[ o.h.o.r.g.e.ORSGraphHopperConfig ]e[m Elevation deactivated.
2026-05-06 17:16:02 e[32mINFO e[m e[36m ORS-pl-driving-care[m e[1;36m[ o.h.o.r.g.e.c.CorePreparationHandler ]e[m Using 1 threads for ch preparation threads
2026-05-06 17:16:02 e[32mINFO e[m e[36m ORS-pl-driving-care[m e[1;36m[ o.h.o.r.g.e.c.CoreLMPreparationHandler ]e[m Using 1 threads for lm preparation threads
2026-05-06 17:16:03 e[32mINFO e[m e[36m ORS-pl-driving-care[m e[1;36m[ o.h.o.r.g.e.c.CorePreparationHandler ]e[m Using 1 threads for ch preparation threads
2026-05-06 17:16:03 e[32mINFO e[m e[36m ORS-pl-driving-care[m e[1;36m[ o.h.o.r.g.e.c.CoreLMPreparationHandler ]e[m Using 1 threads for lm preparation threads
2026-05-06 17:16:03 e[32mINFO e[m e[36m ORS-pl-driving-care[m e[1;36m[ o.h.o.r.g.e.ORSGraphHopper ]e[m version v4.12.0|2025-11-28T01:28:14Z (7,20,5,4,5,7)
2026-05-06 17:16:03 e[32mINFO e[m e[36m ORS-pl-driving-care[m e[1;36m[ o.h.o.r.g.e.ORSGraphHopper ]e[m graph CH|car_ors|MMAP_STORE|2D|turn_cost|, details:edges:0(0MB), nodes:0(0MB), name:(0MB), geo:0(0MB), bounds:1.7976931348623157E308,-1.7976931348623157E308,1.7976931348623157E308,-1.7976931348623157E308, shortcuts:0 (0MB), nodesCH:-1 (0MB), shortcuts:0 (0MB), nodesCH:-1 (0MB)
2026-05-06 17:16:04 e[32mINFO e[m e[36m ORS-pl-driving-care[m e[1;36m[ o.h.o.r.g.e.ORSGraphHopper ]e[m No custom areas are used, custom_areas.directory not given
2026-05-06 17:16:04 e[32mINFO e[m e[36m ORS-pl-driving-care[m e[1;36m[ o.h.o.r.g.e.ORSGraphHopper ]e[m start creating graph from files/merged.pbf
2026-05-06 17:16:04 e[32mINFO e[m e[36m ORS-pl-driving-care[m e[1;36m[ o.h.o.r.g.e.ORSGraphHopper ]e[m using CH|car_ors|MMAP_STORE|2D|turn_cost|, memory:totalMB:16384, usedMB:300
2026-05-06 17:16:09 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.Application ]e[m Started Application in 21.027 seconds (process running for 29.452)
2026-05-06 17:16:09 e[32mINFO e[m e[36m maine[m e[1;36m[ o.h.o.a.Application ]e[m openrouteservice {“build_date”:“2026-04-29T08:25:55Z”,“graph_version”:“4”,“version”:“9.9.0”}

Hey,

we are currently investigating this.
The final graphs and the needed RAM for running the graphs is as expected, so it seems to be quite tricky.

Best regards

1 Like