We had a container working perfectly, but it was necessary to assemble a new machine/container and in this installation we are not able to complete it successfully.
The container is running, the log indicates that it is generating the graphics, but it is taking a long time and around 1 hour and 1/2 the server crashes with 100% CPU usage.
I’m uploading in an environment identical to the one we had, a Rock Linux server with 4 processors and 12 GB of RAM, we are using 10GB for heap, the data file with the maps has 1.6GB (Brazil maps) and we saw that the minimum would be needed 3.2GB of RAM, but we put a lot more than that and still the server is crashing, can anyone help us?
Below settings:
########################################################
docker-compose.yml
########################################################
version: ‘2.4’
services:
ors-app:
container_name: ors-app
ports:
- “8080:8080”
- “9001:9001”
image: openrouteservice/openrouteservice:latest
user: “${UID:-0}:${GID:-0}”
######## build:
######## context: ./
######## args:
######## OSM_FILE: ./ors-api/src/test/files/heidelberg.osm.gz
volumes:
- ./docker/graphs:/home/ors/ors-core/data/graphs
- ./docker/elevation_cache:/home/ors/ors-core/data/elevation_cache
- ./docker/logs/ors:/home/ors/logs
- ./docker/logs/tomcat:/home/ors/tomcat/logs
- ./docker/conf:/home/ors/ors-conf
- ./docker/data:/home/ors/ors-core/data
environment:
- BUILD_GRAPHS=True # Forces the container to rebuild the graphs, e.g. when PBF is changed
- “JAVA_OPTS=-Djava.awt.headless=true -server -XX:TargetSurvivorRatio=75 -XX:SurvivorRatio=64 -XX:MaxTenuringThreshold=3 -XX:+UseG1GC -XX:+ScavengeBeforeFullGC -XX:ParallelGCThreads=4 -Xms1g -Xmx10g”
- “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”
########################################################
ors-config.json → Routing and profile sector
########################################################
"routing": {
"enabled": true,
"mode": "normal",
"routing_description": "This is a routing file from openrouteservice",
"routing_name": "openrouteservice routing",
"sources": [
"/home/ors/ors-core/data/brazil-latest.osm.pbf"
],
"init_threads": 1,
"attribution": "openrouteservice.org, OpenStreetMap contributors",
"elevation_preprocessed": false,
"profiles": {
"active": [
"car"
],
"default_params": {
"encoder_flags_size": 8,
"graphs_root_path": "/home/ors/ors-core/data/graphs",
"elevation_provider": "multi",
"elevation_cache_path": "/home/ors/ors-core/data/elevation_cache",
"elevation_cache_clear": false,
"instructions": true,
"maximum_distance": 10000000,
"maximum_distance_dynamic_weights": 10000000,
"maximum_distance_avoid_areas": 10000000,
"maximum_waypoints": 500,
"maximum_snapping_radius": 400,
"maximum_avoid_polygon_area": 20000000000,
"maximum_avoid_polygon_extent": 2000000,
"maximum_distance_alternative_routes": 10000000,
"maximum_alternative_routes": 3,
"maximum_distance_round_trip_routes": 10000000,
"maximum_speed_lower_bound": 80,
"preparation": {
"min_network_size": 200,
"min_one_way_network_size": 200,
"methods": {
"lm": {
"enabled": true,
"threads": 1,
"weightings": "recommended,shortest",
"landmarks": 16
}
}
},
"execution": {
"methods": {
"lm": {
"disabling_allowed": true,
"active_landmarks": 8
}
}
}
},
"profile-car": {
"profiles": "driving-car",
"parameters": {
"encoder_flags_size": 8,
"encoder_options": "turn_costs=true|block_fords=false|use_acceleration=true",
"maximum_distance": 100000,
"elevation": true,
"maximum_snapping_radius": 350,
"preparation": {
"min_network_size": 200,
"min_one_way_network_size": 200,
"methods": {
"ch": {
"enabled": true,
"threads": 1,
########################################################
ors.log → Last Log
########################################################
2023-08-04 13:42:43,118 INFO [ors.Application] - Starting Application v7.1.0 using Java 17.0.7 on fd62f371f960 with PID 1 (/home/ors/tomcat/webapps/ors/WEB-INF/classes started by root in /home/ors)
2023-08-04 13:42:43,121 DEBUG [ors.Application] - Running with Spring Boot v2.7.12, Spring v5.3.27
2023-08-04 13:42:43,122 INFO [ors.Application] - No active profile set, falling back to 1 default profile: “default”
2023-08-04 13:42:47,789 INFO [ors.Application] - Started Application in 6.037 seconds (JVM running for 13.369)
2023-08-04 13:42:47,816 INFO [logging.LoggingUtility] - Logging configuration loaded from DEBUG_LOGGING.json, logging to file /home/ors/ors-core/logs/ors/ors-logs.log
2023-08-04 13:42:47,828 INFO [routing.RoutingProfileManager] - Total - 1024 MB, Free - 676.13 MB, Max: 10 GB, Used - 347.87 MB
2023-08-04 13:42:47,828 INFO [routing.RoutingProfileManager] -
2023-08-04 13:42:47,900 INFO [routing.RoutingProfileManager] - ====> Initializing profiles from ‘/home/ors/ors-core/data/brazil-latest.osm.pbf’ (1 threads) …
2023-08-04 13:42:47,906 INFO [routing.RoutingProfileManager] - 1 tasks submitted.
2023-08-04 13:42:47,911 INFO [routing.RoutingProfile] - [1] Profiles: ‘driving-car’, location: ‘/home/ors/ors-core/data/graphs/car’.
2023-08-04 13:42:48,384 INFO [core.CoreLMPreparationHandler] - Loaded landmark splitting collection from
2023-08-04 13:42:48,442 INFO [extensions.ORSGraphHopper] - version 4.0|2023-06-12T14:59:08Z (7,20,5,4,5,7)
2023-08-04 13:42:48,448 INFO [extensions.ORSGraphHopper] - graph CH|car_ors|RAM_STORE|3D|turn_cost|, details:edges:0(0MB), nodes:0(0MB), name:(0MB), geo:0(0MB), bounds:1.7976931348623157E308,-1.7976931348623157E308,1.7976931348623157E308,-1.7976931348623157E308,1.7976931348623157E308,-1.7976931348623157E308, shortcuts:0 (0MB), nodesCH:-1 (0MB), shortcuts:0 (0MB), nodesCH:-1 (0MB), shortcuts:0 (0MB), nodesCH:-1 (0MB)
2023-08-04 13:42:48,636 INFO [extensions.ORSGraphHopper] - No custom areas are used, custom_areas.directory not given
2023-08-04 13:42:48,649 INFO [extensions.ORSGraphHopper] - start creating graph from /home/ors/ors-core/data/brazil-latest.osm.pbf
2023-08-04 13:42:48,675 INFO [extensions.ORSGraphHopper] - using CH|car_ors|RAM_STORE|3D|turn_cost|, memory:totalMB:1024, usedMB:487