Not sure how to use the docker config-file ors-config.yml

Hello,

First of all, I am a complete beginner and have no advanced coding or API knowledge whatsoever.

I have succesffuly installed ORS locally via docker, have download a map of France and successfully updated config file (ors-config) to point towards that map instead of the Heidelbeg example map. I’m using the API via swagger-ui and it seems to be working fine with the driving-car profile.

I’m trying now to do more advanced requests (longer isochrones, heavy good vehicles instead of cars) but i’m not sure how to do so with within the ors-config file. I have simply uncommented all comments to activate some parameters, but I’m getting an error when launching the docker container via docker-compose.
The container works fine in the “minimal” configuration set-up, but when everything is uncommented it generates an error.

Below are my config file, the docker-compose file as well as the error I’m getting.
I have just replaced some URL links with " LINK_REMOVED" in order to comply with the forum’s poting rules for new uses.

How do I proceed from here?

Thank you for your help!

Errors
at org.springframework.boot.env.OriginTrackedYamlLoader.load(OriginTrackedYamlLoader.java:84) ~[spring-boot-3.4.5.jar!/:3.4.5]

at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:50) ~[spring-boot-3.4.5.jar!/:3.4.5]

at org.heigit.ors.api.ORSEnvironmentPostProcessor.postProcessEnvironment(ORSEnvironmentPostProcessor.java:68) ~[!/:9.3.1]

at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:132) ~[spring-boot-3.4.5.jar!/:3.4.5]

at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:115) ~[spring-boot-3.4.5.jar!/:3.4.5]

at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185) ~[spring-context-6.2.6.jar!/:6.2.6]

at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178) ~[spring-context-6.2.6.jar!/:6.2.6]

at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156) ~[spring-context-6.2.6.jar!/:6.2.6]

at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138) ~[spring-context-6.2.6.jar!/:6.2.6]

at org.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136) ~[spring-boot-3.4.5.jar!/:3.4.5]

at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:81) ~[spring-boot-3.4.5.jar!/:3.4.5]

at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:64) ~[spring-boot-3.4.5.jar!/:3.4.5]

at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]

at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118) ~[spring-boot-3.4.5.jar!/:3.4.5]

at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112) ~[spring-boot-3.4.5.jar!/:3.4.5]

at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:63) ~[spring-boot-3.4.5.jar!/:3.4.5]

at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:353) [spring-boot-3.4.5.jar!/:3.4.5]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-3.4.5.jar!/:3.4.5]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1362) [spring-boot-3.4.5.jar!/:3.4.5]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1351) [spring-boot-3.4.5.jar!/:3.4.5]

at org.heigit.ors.api.Application.main(Application.java:35) [!/:9.3.1]

at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]

at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]

at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:102) [ors.jar:9.3.1]

at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) [ors.jar:9.3.1]

at org.springframework.boot.loader.lau[Processing: 2025-09-11_11h11_15.png…]()

ch.JarLauncher.main(JarLauncher.java:40) [ors.jar:9.3.1]

Config file

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

Minimal configuration example file for openrouteservice. For a description please visit:

Configuration | openrouteservice backend documentation

################################################################################################
ors:
engine:
profile_default:
build:
source_file: /home/ors/files/france-250909.osm.pbf
profiles:
driving-car:
enabled: true
driving-hgv:
enabled: true
################################################################################

Configuration file for openrouteservice. For a description please visit:

LINK_REMOVED

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

General server settings

server:
port: 8082
error:
whitelabel:
enabled: false

Keep the context-path at / else the war file run with tomcat will have the context-path of /ors/v2 as well.

servlet:
context-path: /ors
tomcat:
keep-alive-timeout: 30000
spring:
profiles:
active: default
mvc:
servlet:
path: /

Settings related to springdoc

springdoc:
swagger-ui:
enabled: true
path: /swagger-ui
tryItOutEnabled: true
filter: false
syntaxHighlight:
activated: true
showExtensions: true
api-docs:
path: /v2/api-docs
version: OPENAPI_3_0
packages-to-scan: org.heigit.ors
pathsToMatch: /v2/**

Logging settings

logging:
file:
name: ./logs/ors.log
pattern:
console: “%d{yyyy-MM-dd HH:mm:ss} %highlight{%-7p} %style{%50t}{Cyan} %style{[ %-40.40c{1.} ]}{Bright Cyan} %m%n”
file: “%d{yyyy-MM-dd HH:mm:ss} %p [%-40.40c{1.}] - %m%n”
level:
root: WARN
org.heigit: INFO

openrouteservice specific settings

ors:
cors:
allowed_origins: “*”
allowed_headers: Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization
preflight_max_age: 600
messages:

ORS endpoints settings

endpoints:
routing:
enabled: true
attribution: LINK_REMOVED, OpenStreetMap contributors, tmc - BASt
gpx_name: ORSRouting
gpx_description: This is a directions instructions file as GPX, generated from openrouteservice
gpx_base_url: LINK_REMOVED
gpx_support_mail: LINK_REMOVED
gpx_author: openrouteservice
gpx_content_licence: LGPL 3.0
maximum_avoid_polygon_area: 200000000
maximum_avoid_polygon_extent: 20000
maximum_alternative_routes: 3
matrix:
enabled: true
attribution: LINK_REMOVED, OpenStreetMap contributors
maximum_routes: 2500
maximum_routes_flexible: 25
maximum_visited_nodes: 100000
maximum_search_radius: 2000
u_turn_costs: -1
isochrones:
enabled: true
attribution: LINK_REMOVED, OpenStreetMap contributors
maximum_locations: 2
maximum_intervals: 1
allow_compute_area: true
maximum_range_distance_default: 50000
maximum_range_distance:
- profiles: driving-car, driving-hgv
value: 100000
maximum_range_time_default: 18000
maximum_range_time:
- profiles: driving-car, driving-hgv
value: 10800
fastisochrones:
maximum_range_distance_default: 50000
maximum_range_distance:
- profiles: driving-car, driving-hgv
value: 500000
maximum_range_time_default: 18000
maximum_range_time:
- profiles: driving-car, driving-hgv
value: 10800
snap:
enabled: true
attribution: LINK_REMOVED, OpenStreetMap contributors
maximum_locations: 5000

ORS engine settings

engine:
init_threads: 1
preparation_mode: false
graphs_data_access: RAM_STORE
elevation:
preprocessed: false
data_access: MMAP
cache_clear: false
provider: multi
cache_path: elevation_cache
profile_default:
enabled: false
graph_path: graphs
build:
source_file:
elevation: true
elevation_smoothing: false
encoder_flags_size: 8
instructions: true
optimize: false
traffic: false
maximum_speed_lower_bound: 80
location_index_resolution: 500
location_index_search_iterations: 4
interpolate_bridges_and_tunnels: true
preparation:
min_network_size: 200
methods:
lm:
enabled: true
threads: 1
weightings: recommended,shortest
landmarks: 16
service:
maximum_distance: 100000
maximum_distance_dynamic_weights: 100000
maximum_distance_avoid_areas: 100000
maximum_waypoints: 50
maximum_snapping_radius: 400
maximum_distance_alternative_routes: 100000
maximum_distance_round_trip_routes: 100000
maximum_visited_nodes: 1000000
force_turn_costs: false
allow_custom_models: true
execution:
methods:
lm:
active_landmarks: 8

Profile specific settings,
overriding the properties in ors.engine.profile_default.
Profile defaults defined here are not overridden by
a custom YAML file’s ors.engine.profile_default, but by
a custom YAML file’s ors.engine.profiles.

profiles:
driving-car:
encoder_name: driving-car
build:
encoder_options:
turn_costs: true
block_fords: false
use_acceleration: true
enable_custom_models: false
preparation:
min_network_size: 200
methods:
ch:
enabled: true
threads: 1
weightings: fastest
lm:
enabled: false
core:
enabled: true
threads: 1
weightings: fastest,shortest
landmarks: 64
lmsets: highways;allow_all
ext_storages:
WayCategory:
HeavyVehicle:
Tollways:
WaySurfaceType:
RoadAccessRestrictions:
use_for_warnings: true
service:
execution:
methods:
lm:
active_landmarks: 6
core:
active_landmarks: 6
driving-hgv:
encoder_name: driving-hgv
build:
encoder_options:
turn_costs: true
block_fords: false
use_acceleration: true
enable_custom_models: false
preparation:
min_network_size: 200
methods:
ch:
enabled: true
threads: 1
weightings: recommended
lm:
enabled: false
core:
enabled: true
threads: 1
weightings: recommended,shortest
landmarks: 64
lmsets: highways;allow_all
ext_storages:
WayCategory:
HeavyVehicle:
restrictions: true
Tollways:
WaySurfaceType:
service:
execution:
methods:
core:
active_landmarks: 6
cycling-regular:
encoder_name: cycling-regular
build:
encoder_options:
consider_elevation: true
turn_costs: true
block_fords: false
enable_custom_models: false
ext_storages:
WayCategory:
WaySurfaceType:
HillIndex:
TrailDifficulty:
cycling-mountain:
encoder_name: cycling-mountain
build:
encoder_options:
consider_elevation: true
turn_costs: true
block_fords: false
enable_custom_models: false
ext_storages:
WayCategory:
WaySurfaceType:
HillIndex:
TrailDifficulty:
cycling-road:
encoder_name: cycling-road
build:
encoder_options:
consider_elevation: true
turn_costs: true
block_fords: false
enable_custom_models: false
ext_storages:
WayCategory:
WaySurfaceType:
HillIndex:
TrailDifficulty:
cycling-electric:
encoder_name: cycling-electric
build:
encoder_options:
consider_elevation: true
turn_costs: true
block_fords: false
enable_custom_models: false
ext_storages:
WayCategory:
WaySurfaceType:
HillIndex:
TrailDifficulty:
foot-walking:
encoder_name: foot-walking
build:
encoder_options:
block_fords: false
enable_custom_models: false
ext_storages:
WayCategory:
WaySurfaceType:
HillIndex:
TrailDifficulty:
foot-hiking:
encoder_name: foot-hiking
build:
encoder_options:
block_fords: false
enable_custom_models: false
ext_storages:
WayCategory:
WaySurfaceType:
HillIndex:
TrailDifficulty:
wheelchair:
encoder_name: wheelchair
build:
encoder_options:
block_fords: true
enable_custom_models: false
ext_storages:
WayCategory:
WaySurfaceType:
Wheelchair:
kerbs_on_crossings: true
OsmId:
service:
maximum_snapping_radius: 50
public-transport:
encoder_name: public-transport
build:
encoder_options:
block_fords: false
enable_custom_models: false
elevation: true
gtfs_file: ./src/test/files/vrn_gtfs_cut.zip
service:
maximum_visited_nodes: 1000000

Sorry, the error was truncated in the post. Here it is:

✓ 🙭 Ready to start the ORS application 🙭
ors-app | 08:48:31.825 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
ors-app | org.yaml.snakeyaml.constructor.DuplicateKeyException: while constructing a mapping
ors-app | in ‘reader’, line 5, column 1:
ors-app | ors:
ors-app | ^
ors-app | found duplicate key ors
ors-app | in ‘reader’, line 62, column 1:
ors-app | ors:
ors-app | ^
ors-app |
ors-app | at org.yaml.snakeyaml.constructor.SafeConstructor.processDuplicateKeys(SafeConstructor.java:126) ~[snakeyaml-2.2.jar!/:?]
ors-app | at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:78) ~[snakeyaml-2.2.jar!/:?]
ors-app | at org.yaml.snakeyaml.constructor.SafeConstructor.flattenMapping(SafeConstructor.java:73) ~[snakeyaml-2.2.jar!/:?]
ors-app | at org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:209) ~[snakeyaml-2.2.jar!/:?]
ors-app | at org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:552) ~[snakeyaml-2.2.jar!/:?]
ors-app | at org.yaml.snakeyaml.constructor.SafeConstructor$ConstructYamlMap.construct(SafeConstructor.java:597) ~[snakeyaml-2.2.jar!/:?]
ors-app | at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:264) ~[snakeyaml-2.2.jar!/:?]
ors-app | at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:247) ~[snakeyaml-2.2.jar!/:?]
ors-app | at org.springframework.boot.env.OriginTrackedYamlLoader$OriginTrackingConstructor.constructObject(OriginTrackedYamlLoader.java:119) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:201) ~[snakeyaml-2.2.jar!/:?]
ors-app | at org.yaml.snakeyaml.constructor.BaseConstructor.getData(BaseConstructor.java:166) ~[snakeyaml-2.2.jar!/:?]
ors-app | at org.springframework.boot.env.OriginTrackedYamlLoader$OriginTrackingConstructor.getData(OriginTrackedYamlLoader.java:99) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.yaml.snakeyaml.Yaml$1.next(Yaml.java:515) ~[snakeyaml-2.2.jar!/:?]
ors-app | at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:203) ~[spring-beans-6.2.6.jar!/:6.2.6]
ors-app | at org.springframework.beans.factory.config.YamlProcessor.process(YamlProcessor.java:169) ~[spring-beans-6.2.6.jar!/:6.2.6]
ors-app | at org.springframework.boot.env.OriginTrackedYamlLoader.load(OriginTrackedYamlLoader.java:84) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.springframework.boot.env.YamlPropertySourceLoader.load(YamlPropertySourceLoader.java:50) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.heigit.ors.api.ORSEnvironmentPostProcessor.postProcessEnvironment(ORSEnvironmentPostProcessor.java:68) ~[!/:9.3.1]
ors-app | at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:132) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:115) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185) ~[spring-context-6.2.6.jar!/:6.2.6]
ors-app | at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178) ~[spring-context-6.2.6.jar!/:6.2.6]
ors-app | at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156) ~[spring-context-6.2.6.jar!/:6.2.6]
ors-app | at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138) ~[spring-context-6.2.6.jar!/:6.2.6]
ors-app | at org.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:81) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:64) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
ors-app | at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:112) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:63) ~[spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:353) [spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1362) [spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1351) [spring-boot-3.4.5.jar!/:3.4.5]
ors-app | at org.heigit.ors.api.Application.main(Application.java:35) [!/:9.3.1]
ors-app | at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
ors-app | at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
ors-app | at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:102) [ors.jar:9.3.1]
ors-app | at org.springframework.boot.loader.launch.Launcher.launch(Launcher.java:64) [ors.jar:9.3.1]
ors-app | at org.springframework.boot.loader.launch.JarLauncher.main(JarLauncher.java:40) [ors.jar:9.3.1]

According to the error message, there are two sections named “ors” in your config file: In the beginning of your config file and in the part named “openrouteservice specific settings”. These to sections should be merged into one.

2 Likes

Thank you very much, while checking myself I have identified the same problem. Now it seems to be working. Thank you!

Another issue I’m facing is that I’m not able to run isochrone longer than 3600s, even though the config file states a limit way higher than that. How can I troubleshoot this?

Hey,

make sure that your stack includes that change, i.e.:

  1. Make sure your request actually requests you server, and a limit higher than 3600s. Also, make sure an isochrone below 3600s works.
  2. make sure your ors-config.yml is actually being read
  3. make sure your configuration actually allows a limit higher than that, confirming with the backend documentation
  4. make sure that your ors instance knows about it, checking the /status-endpoint

Best regards

1 Like

After further inspection, for some reason it seems that the container was using the example environment file instead of the config file. I then used the example environment file provided to create my own environment file (ors-config.env) and refered to it in the docker-composer.yml file (using “env_file: ors-config.env” under “environment”).

I now have changed the maximum time range in the ors-config.env file and I was able to generate a 3-hour isochrone with no issues. Thank you for your much-appreciated help!

1 Like

@jschnell well, this keeps on giving :smiley:.

I’ve tried to generate a 6-hour isochrone via swagger-ui (see attached screenshot. Ultimate target is somewhere around 9h-10h but i’m not there yet). It actuallly does start calculating but after 7-8 minutes it times out and generates the following error:

|Code|Details|
| --- | --- |
|*Undocumented*|**Failed to fetch.**
**Possible Reasons:**

* CORS
* Network Failure
* URL scheme must be "http" or "https" for CORS request.|

I have allocated 20Go of ram in docker-compose.yml. Do you think this is related to insufficiant memory? Or timeout? Or maybe I’m not using the variables correctly in ors-config.env?

My ors-config.env file below:


#server.port=8082
# server.error.whitelabel.enabled=false
# server.servlet.context-path=/ors
# server.tomcat.keep-alive-timeout=30000
# spring.profiles.active=default
# spring.mvc.servlet.path=/
# springdoc.swagger-ui.enabled=true
# springdoc.swagger-ui.path=/swagger-ui
# springdoc.swagger-ui.tryItOutEnabled=true
# springdoc.swagger-ui.filter=false
# springdoc.swagger-ui.syntaxHighlight.activated=true
# springdoc.swagger-ui.showExtensions=true
# springdoc.api-docs.path=/v2/api-docs
# springdoc.api-docs.version=OPENAPI_3_0
# springdoc.packages-to-scan=org.heigit.ors
# springdoc.pathsToMatch=/v2/**
# logging.file.name=./logs/ors.log
# logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %highlight{%-7p} %style{%50t}{Cyan} %style{[ %-40.40c{1.} ]}{Bright Cyan}   %m%n
# logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss} %p [%-40.40c{1.}] - %m%n
# logging.level.root=WARN
# logging.level.org.heigit=INFO
# ors.cors.allowed_origins=*
# ors.cors.allowed_headers=Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization
# ors.cors.preflight_max_age=600
# ors.messages=
# ors.endpoints.routing.enabled=true
# ors.endpoints.routing.attribution=openrouteservice.org, OpenStreetMap contributors, tmc - BASt
# ors.endpoints.routing.gpx_name=ORSRouting
# ors.endpoints.routing.gpx_description=This is a directions instructions file as GPX, generated from openrouteservice
# ors.endpoints.routing.gpx_base_url=https://openrouteservice.org/
# ors.endpoints.routing.gpx_support_mail=support@openrouteservice.org
# ors.endpoints.routing.gpx_author=openrouteservice
# ors.endpoints.routing.gpx_content_licence=LGPL 3.0
# ors.endpoints.routing.maximum_avoid_polygon_area=200000000
# ors.endpoints.routing.maximum_avoid_polygon_extent=20000
# ors.endpoints.routing.maximum_alternative_routes=3
# ors.endpoints.matrix.enabled=true
# ors.endpoints.matrix.attribution=openrouteservice.org, OpenStreetMap contributors
# ors.endpoints.matrix.maximum_routes=2500
# ors.endpoints.matrix.maximum_routes_flexible=25
# ors.endpoints.matrix.maximum_visited_nodes=100000
# ors.endpoints.matrix.maximum_search_radius=2000
# ors.endpoints.matrix.u_turn_costs=-1
ors.endpoints.isochrones.enabled=true
ors.endpoints.isochrones.attribution=openrouteservice.org, OpenStreetMap contributors
ors.endpoints.isochrones.maximum_locations=2
ors.endpoints.isochrones.maximum_intervals=1
ors.endpoints.isochrones.allow_compute_area=true
ors.endpoints.isochrones.maximum_range_distance_default=50000
ors.endpoints.isochrones.maximum_range_distance.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.maximum_range_distance.0.value=100000
ors.endpoints.isochrones.maximum_range_time_default=18000
ors.endpoints.isochrones.maximum_range_time.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.maximum_range_time.0.value=32400
ors.endpoints.isochrones.fastisochrones.maximum_range_distance_default=50000
ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.value=500000
ors.endpoints.isochrones.fastisochrones.maximum_range_time_default=18000
ors.endpoints.isochrones.fastisochrones.maximum_range_time.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.fastisochrones.maximum_range_time.0.value=32400
# ors.endpoints.snap.enabled=true
# ors.endpoints.snap.attribution=openrouteservice.org, OpenStreetMap contributors
# ors.endpoints.snap.maximum_locations=5000
# ors.engine.init_threads=1
# ors.engine.preparation_mode=false
# ors.engine.graphs_data_access=RAM_STORE
# ors.engine.elevation.preprocessed=false
# ors.engine.elevation.data_access=MMAP
# ors.engine.elevation.cache_clear=false
# ors.engine.elevation.provider=multi
# ors.engine.elevation.cache_path=elevation_cache
# ors.engine.profile_default.enabled=false
# ors.engine.profile_default.graph_path=graphs
ors.engine.profile_default.build.source_file = /home/ors/files/france-250909.osm.pbf
# ors.engine.profile_default.build.elevation=true
# ors.engine.profile_default.build.elevation_smoothing=false
# ors.engine.profile_default.build.encoder_flags_size=8
# ors.engine.profile_default.build.instructions=true
# ors.engine.profile_default.build.optimize=false
# ors.engine.profile_default.build.traffic=false
# ors.engine.profile_default.build.maximum_speed_lower_bound=80
# ors.engine.profile_default.build.location_index_resolution=500
# ors.engine.profile_default.build.location_index_search_iterations=4
# ors.engine.profile_default.build.interpolate_bridges_and_tunnels=true
# ors.engine.profile_default.build.preparation.min_network_size=200
# ors.engine.profile_default.build.preparation.methods.lm.enabled=true
# ors.engine.profile_default.build.preparation.methods.lm.threads=1
# ors.engine.profile_default.build.preparation.methods.lm.weightings=recommended,shortest
# ors.engine.profile_default.build.preparation.methods.lm.landmarks=16
# ors.engine.profile_default.service.maximum_distance=100000
# ors.engine.profile_default.service.maximum_distance_dynamic_weights=100000
# ors.engine.profile_default.service.maximum_distance_avoid_areas=100000
# ors.engine.profile_default.service.maximum_waypoints=50
# ors.engine.profile_default.service.maximum_snapping_radius=400
# ors.engine.profile_default.service.maximum_distance_alternative_routes=100000
# ors.engine.profile_default.service.maximum_distance_round_trip_routes=100000
# ors.engine.profile_default.service.maximum_visited_nodes=1000000
# ors.engine.profile_default.service.force_turn_costs=false
# ors.engine.profile_default.service.allow_custom_models=true
# ors.engine.profile_default.service.execution.methods.lm.active_landmarks=8
# ors.engine.profiles.driving-car.encoder_name=driving-car
# ors.engine.profiles.driving-car.build.encoder_options.turn_costs=true
# ors.engine.profiles.driving-car.build.encoder_options.block_fords=false
# ors.engine.profiles.driving-car.build.encoder_options.use_acceleration=true
# ors.engine.profiles.driving-car.build.encoder_options.enable_custom_models=false
# ors.engine.profiles.driving-car.build.preparation.min_network_size=200
# ors.engine.profiles.driving-car.build.preparation.methods.ch.enabled=true
# ors.engine.profiles.driving-car.build.preparation.methods.ch.threads=1
# ors.engine.profiles.driving-car.build.preparation.methods.ch.weightings=fastest
# ors.engine.profiles.driving-car.build.preparation.methods.lm.enabled=false
# ors.engine.profiles.driving-car.build.preparation.methods.core.enabled=true
# ors.engine.profiles.driving-car.build.preparation.methods.core.threads=1
# ors.engine.profiles.driving-car.build.preparation.methods.core.weightings=fastest,shortest
# ors.engine.profiles.driving-car.build.preparation.methods.core.landmarks=64
# ors.engine.profiles.driving-car.build.preparation.methods.core.lmsets=highways;allow_all
# ors.engine.profiles.driving-car.build.ext_storages.WayCategory=
# ors.engine.profiles.driving-car.build.ext_storages.HeavyVehicle=
# ors.engine.profiles.driving-car.build.ext_storages.Tollways=
# ors.engine.profiles.driving-car.build.ext_storages.WaySurfaceType=
# ors.engine.profiles.driving-car.build.ext_storages.RoadAccessRestrictions.use_for_warnings=true
# ors.engine.profiles.driving-car.service.execution.methods.lm.active_landmarks=6
# ors.engine.profiles.driving-car.service.execution.methods.core.active_landmarks=6
ors.engine.profiles.driving-car.enabled = true
ors.engine.profiles.driving-hgv.enabled = true

Quick update just so others facing the same problem can follow. I went through postman to run the API requests using 16Go in the docker-compose file and succeeded to generate a 6-hour hgv isochrone. When I tried 9 hours, I had the error below. I believe it to be a memory issue. I have now increased the memory to 20Go and re-run the request through postman but same thing happened. I believe that docker allows by default 50% of my PC’s ram, so 15Go. Increasing the memory allowed to 20Go in the docker-compose file seems to do nothing.

"message": "Handler dispatch failed: java.lang.OutOfMemoryError: Java heap space"

hey,

driving isochrones indeed tend to get rather large, so I could imagine that this is indeed a memory-related issue.

Best regards

With 9h I guess the isochrone might cover the whole of France, so you might scan the whole graph. This may consume a lot of memory and processing time.

You might also try enabling fastisochrones? It requires a lot more preprocessing time when building the graphs but performs much better when computing long distance isochrones.

1 Like

Hi @sascha, thank you! I’ve eventually succeeded to push it to 7 hours but it took 1h22 to compute.

I did not find any documentation about fastisochrones. I’ve already enabled it and assumed
it would actually take over automatically when running a standard isochrone request. Is that correct?

Correct. If it is enabled and the request has no “options”, then the fast isochrones algorithm is used, otherwise the standard isochrones algorithm.

2 Likes

Thank you! Another question: how can I make sure fast isochrones are enabled? Is there a specific line I need to add to one of my files? Or just enabling default and maximum allowed distance and time parameters should do it?
I have a config file (ors-config.yml) and an adjacent environment file (ors-config.env ; see below). that if I’m not mistaken should take precedence over tge .yml file.

#server.port=8082
#server.error.whitelabel.enabled=false
#server.servlet.context-path=/ors
#server.tomcat.keep-alive-timeout=30000
#spring.profiles.active=default
#spring.mvc.servlet.path=/
#springdoc.swagger-ui.enabled=true
#springdoc.swagger-ui.path=/swagger-ui
#springdoc.swagger-ui.tryItOutEnabled=true
#springdoc.swagger-ui.filter=false
#springdoc.swagger-ui.syntaxHighlight.activated=true
#springdoc.swagger-ui.showExtensions=true
#springdoc.api-docs.path=/v2/api-docs
#springdoc.api-docs.version=OPENAPI_3_0
#springdoc.packages-to-scan=org.heigit.ors
#springdoc.pathsToMatch=/v2/**
#logging.file.name=./logs/ors.log
#logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %highlight{%-7p} %style{%50t}{Cyan} %style{[ %-40.40c{1.} ]}{Bright Cyan} %m%n
#logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss} %p [%-40.40c{1.}] - %m%n
#logging.level.root=WARN
#logging.level.org.heigit=INFO
openrouteservice.cors.allowed_origins=*
openrouteservice.cors.allowed_headers=Content-Type, X-Requested-With, accept, Origin, Access-Control-Request-Method, Access-Control-Request-Headers, Authorization
openrouteservice.cors.preflight_max_age=600
openrouteservice.messages=
openrouteservice.endpoints.routing.enabled=true
#ors.endpoints.routing.attribution=openrouteservice.org, OpenStreetMap contributors, tmc - BASt
openrouteservice.endpoints.routing.gpx_name=ORSRouting
openrouteservice.endpoints.routing.gpx_description=This is a directions instructions file as GPX, generated from openrouteservice
openrouteservice.endpoints.routing.gpx_base_url=https://openrouteservice.org/
openrouteservice.endpoints.routing.gpx_support_mail=support@openrouteservice.org
openrouteservice.endpoints.routing.gpx_author=openrouteservice
openrouteservice.endpoints.routing.gpx_content_licence=LGPL 3.0
openrouteservice.endpoints.routing.maximum_avoid_polygon_area=200000000
openrouteservice.endpoints.routing.maximum_avoid_polygon_extent=20000
openrouteservice.endpoints.routing.maximum_alternative_routes=3
openrouteservice.endpoints.matrix.enabled=true
#ors.endpoints.matrix.attribution=openrouteservice.org, OpenStreetMap contributors
openrouteservice.endpoints.matrix.maximum_routes=2500
openrouteservice.endpoints.matrix.maximum_routes_flexible=25
openrouteservice.endpoints.matrix.maximum_visited_nodes=100000
openrouteservice.endpoints.matrix.maximum_search_radius=2000
openrouteservice.endpoints.matrix.u_turn_costs=-1
ors.endpoints.isochrones.enabled=true
ors.endpoints.isochrones.attribution=openrouteservice.org, OpenStreetMap contributors
ors.endpoints.isochrones.maximum_locations=2
ors.endpoints.isochrones.maximum_intervals=1
ors.endpoints.isochrones.allow_compute_area=true
ors.endpoints.isochrones.maximum_range_distance_default=50000
ors.endpoints.isochrones.maximum_range_distance.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.maximum_range_distance.0.value=100000
ors.endpoints.isochrones.maximum_range_time_default=18000
ors.endpoints.isochrones.maximum_range_time.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.maximum_range_time.0.value=32400
ors.endpoints.isochrones.fastisochrones.maximum_range_distance_default=50000
ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.fastisochrones.maximum_range_distance.0.value=500000
ors.endpoints.isochrones.fastisochrones.maximum_range_time_default=18000
ors.endpoints.isochrones.fastisochrones.maximum_range_time.0.profiles=driving-car, driving-hgv
ors.endpoints.isochrones.fastisochrones.maximum_range_time.0.value=32400
openrouteservice.endpoints.snap.enabled=true
#ors.endpoints.snap.attribution=openrouteservice.org, OpenStreetMap contributors
openrouteservice.endpoints.snap.maximum_locations=5000
openrouteservice.engine.init_threads=1
openrouteservice.engine.preparation_mode=false
openrouteservice.engine.graphs_data_access=RAM_STORE
openrouteservice.engine.elevation.preprocessed=false
openrouteservice.engine.elevation.data_access=MMAP
openrouteservice.engine.elevation.cache_clear=false
openrouteservice.engine.elevation.provider=multi
openrouteservice.engine.elevation.cache_path=elevation_cache
openrouteservice.engine.profile_default.enabled=false
openrouteservice.engine.profile_default.graph_path=graphs
ors.engine.profile_default.build.source_file = /home/ors/files/france-250909.osm.pbf
openrouteservice.engine.profile_default.build.elevation=true
openrouteservice.engine.profile_default.build.elevation_smoothing=false
openrouteservice.engine.profile_default.build.encoder_flags_size=8
openrouteservice.engine.profile_default.build.instructions=true
openrouteservice.engine.profile_default.build.optimize=false
openrouteservice.engine.profile_default.build.traffic=false
openrouteservice.engine.profile_default.build.maximum_speed_lower_bound=80
openrouteservice.engine.profile_default.build.location_index_resolution=500
openrouteservice.engine.profile_default.build.location_index_search_iterations=4
openrouteservice.engine.profile_default.build.interpolate_bridges_and_tunnels=true
openrouteservice.engine.profile_default.build.preparation.min_network_size=200
openrouteservice.engine.profile_default.build.preparation.methods.lm.enabled=true
openrouteservice.engine.profile_default.build.preparation.methods.lm.threads=1
openrouteservice.engine.profile_default.build.preparation.methods.lm.weightings=recommended,shortest
openrouteservice.engine.profile_default.build.preparation.methods.lm.landmarks=16
openrouteservice.engine.profile_default.service.maximum_distance=100000
openrouteservice.engine.profile_default.service.maximum_distance_dynamic_weights=100000
openrouteservice.engine.profile_default.service.maximum_distance_avoid_areas=100000
openrouteservice.engine.profile_default.service.maximum_waypoints=50
openrouteservice.engine.profile_default.service.maximum_snapping_radius=400
openrouteservice.engine.profile_default.service.maximum_distance_alternative_routes=100000
openrouteservice.engine.profile_default.service.maximum_distance_round_trip_routes=100000
openrouteservice.engine.profile_default.service.maximum_visited_nodes=1000000
openrouteservice.engine.profile_default.service.force_turn_costs=false
openrouteservice.engine.profile_default.service.allow_custom_models=true
openrouteservice.engine.profile_default.service.execution.methods.lm.active_landmarks=8
openrouteservice.engine.profiles.driving-car.encoder_name=driving-car
openrouteservice.engine.profiles.driving-car.build.encoder_options.turn_costs=true
openrouteservice.engine.profiles.driving-car.build.encoder_options.block_fords=false
openrouteservice.engine.profiles.driving-car.build.encoder_options.use_acceleration=true
openrouteservice.engine.profiles.driving-car.build.encoder_options.enable_custom_models=false
openrouteservice.engine.profiles.driving-car.build.preparation.min_network_size=200
openrouteservice.engine.profiles.driving-car.build.preparation.methods.ch.enabled=true
openrouteservice.engine.profiles.driving-car.build.preparation.methods.ch.threads=1
openrouteservice.engine.profiles.driving-car.build.preparation.methods.ch.weightings=fastest
openrouteservice.engine.profiles.driving-car.build.preparation.methods.lm.enabled=false
openrouteservice.engine.profiles.driving-car.build.preparation.methods.core.enabled=true
openrouteservice.engine.profiles.driving-car.build.preparation.methods.core.threads=1
openrouteservice.engine.profiles.driving-car.build.preparation.methods.core.weightings=fastest,shortest
openrouteservice.engine.profiles.driving-car.build.preparation.methods.core.landmarks=64
openrouteservice.engine.profiles.driving-car.build.preparation.methods.core.lmsets=highways;allow_all
openrouteservice.engine.profiles.driving-car.build.ext_storages.WayCategory=
openrouteservice.engine.profiles.driving-car.build.ext_storages.HeavyVehicle=
openrouteservice.engine.profiles.driving-car.build.ext_storages.Tollways=
openrouteservice.engine.profiles.driving-car.build.ext_storages.WaySurfaceType=
openrouteservice.engine.profiles.driving-car.build.ext_storages.RoadAccessRestrictions.use_for_warnings=true
openrouteservice.engine.profiles.driving-car.service.execution.methods.lm.active_landmarks=6
openrouteservice.engine.profiles.driving-car.service.execution.methods.core.active_landmarks=6
ors.engine.profiles.driving-car.enabled = false
ors.engine.profiles.driving-hgv.enabled = true

To enable fast isochrones you need to set enabled: true
in ors.engine.profiles.<your-profile>.build.preparation.methods.fastisochrones
in your config.

Note that preprocessing for fast isochrones may take quite some time.

1 Like