# Maximum distance parameter

**URL:** <https://ask.openrouteservice.org/t/maximum-distance-parameter/6821>\
**Category:** openrouteservice\
**Created:** [January 13, 2025, 1:20pm UTC](https://ask.openrouteservice.org/t/maximum-distance-parameter/6821 "2025-01-13T13:20:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![guimaraesvictor](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/guimaraesvictor/32/3441_2.png) [@guimaraesvictor](https://ask.openrouteservice.org/u/guimaraesvictor)\
**Post date:** [January 13, 2025, 1:20pm UTC](https://ask.openrouteservice.org/t/maximum-distance-parameter/6821/1 "2025-01-13T13:20:56Z")

</div>

Hi everyone,

I’m trying to setup ORS on-premises in my local machine, however, I’m facing some problems when changing the maximum distance for an isochrone (using driving-car as profile).

What I’ve done so far:  
1 - Customized the ors-config.yml

 ![Captura de tela 2025-01-13 100408](https://ask.openrouteservice.org/uploads/default/original/2X/a/a5494177d61108c041ba2fe8bce78825e6b16bb4.png)  
2 - Added this line to the docker-compose.yml  
 ![Captura de tela 2025-01-13 100540](https://ask.openrouteservice.org/uploads/default/original/2X/a/aa033466a0d86701bb27c4e17105f9ad0efd5872.png)

When I run [http://localhost:8080/ors/v2/status](http://localhost:8080/ors/v2/status), the maximum distance is equal to the value I set (1000km - 1000000 meters), as shown below:

```auto
"profiles": {
    "driving-car": {
      "storages": {
        "Tollways": {
          "enabled": true
        },
        "WayCategory": {
          "enabled": true
        },
        "HeavyVehicle": {
          "restrictions": true,
          "enabled": true
        },
        "WaySurfaceType": {
          "enabled": true
        },
        "RoadAccessRestrictions": {
          "useForWarnings": true,
          "enabled": true
        }
      },
      "encoder_name": "driving-car",
      "graph_build_date": "2025-01-13T11:11:58Z",
      "osm_date": "2024-09-08T20:21:00Z",
      "limits": {
        "maximum_distance": 1000000,
        "maximum_waypoints": 50,
        "maximum_distance_dynamic_weights": 1000000,
        "maximum_distance_avoid_areas": 1000000
      }
    }
  }

```

But, when I call the endpoint (isochrones/driving-car), it returns the error:

```auto
Error: 400, {"error":{"code":3004,"message":"Parameter 'range=999999.0' is out of range. Maximum possible value is 100000."},"info":{"engine":{"build_date":"2024-12-02T11:09:21Z","graph_version":"1","version":"9.0.0"},"timestamp":1736773832442}}

```

What am I missing here? I live in Brazil and I need at least 1000 km of range, because the country is massive. Any help is appreciated. Thanks in advance!

---

<div class="post-metadata">

**Author:** ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)\
**Post date:** [January 15, 2025, 10:50am UTC](https://ask.openrouteservice.org/t/maximum-distance-parameter/6821/2 "2025-01-15T10:50:56Z")

</div>

Hey,

when you make changes to the config, make sure that the ors is actually using this config.  
This would mean that, in the docker-compose file, you’d have to mount it and configure the docker container to use the mounted file.  
Details can be found here:

> **[Running with Docker | openrouteservice backend documentation](https://giscience.github.io/openrouteservice/run-instance/running-with-docker#configure)**
>
> openrouteservice backend documentation

Next, there was a config change from v8 to v9.

Thus, assuming you’re on v9, when using the configuration via ENV variables from the docker compose file, I think that is the wrong variable:

[ors.engine.profiles.\<profile\>.service | openrouteservice backend documentation](https://giscience.github.io/openrouteservice/run-instance/configuration/engine/profiles/service) suggests that your config variable should be `ors.engine.profile_default.service.maximum_distance`

Best regards

---

<div class="post-metadata">

**Author:** ![guimaraesvictor](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/guimaraesvictor/32/3441_2.png) [@guimaraesvictor](https://ask.openrouteservice.org/u/guimaraesvictor)\
**Post date:** [January 15, 2025, 7:31pm UTC](https://ask.openrouteservice.org/t/maximum-distance-parameter/6821/3 "2025-01-15T19:31:47Z")

</div>

@jschnell, thank you for the insights. I tried both suggestions, but it’s still not working. I am confident the config file is correct because I can enable other profiles, and the request works; however, it always imposes the 100 km limit. As I mentioned, when I check the status using /ors/V2/status, it shows the updated limit. Yet, when I request an isochrone for more than 100 km, I receive an error.

---

<div class="post-metadata">

**Author:** ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)\
**Post date:** [January 15, 2025, 8:05pm UTC](https://ask.openrouteservice.org/t/maximum-distance-parameter/6821/4 "2025-01-15T20:05:41Z")

</div>

Ah yes, my bad - that’s the max for routes.  
Check here:

> **[ors.endpoints.isochrones | openrouteservice backend documentation](https://giscience.github.io/openrouteservice/run-instance/configuration/endpoints/isochrones#ors-endpoints-isochrones)**
>
> openrouteservice backend documentation

Looks like you want to set  
`ors.endpoints.isochrones.maximum_range_distance_default` or `ors.endpoints.maximum_range_distance`

Best regards

---

<div class="post-metadata">

**Author:** ![guimaraesvictor](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/guimaraesvictor/32/3441_2.png) [@guimaraesvictor](https://ask.openrouteservice.org/u/guimaraesvictor)\
**Post date:** [January 15, 2025, 10:10pm UTC](https://ask.openrouteservice.org/t/maximum-distance-parameter/6821/5 "2025-01-15T22:10:47Z")

</div>

@jschnell, thank you again. I tried this, but it is still locked to 100 km. I am not sure what I am doing wrong.

---

<div class="post-metadata">

**Author:** ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)\
**Post date:** [January 16, 2025, 7:35am UTC](https://ask.openrouteservice.org/t/maximum-distance-parameter/6821/6 "2025-01-16T07:35:25Z")

</div>

Hey,

Could you provide your `docker-compose.yml` and your `ors-config.yml`, as well as a layout of your docker-related directory?

Best regards

---

<div class="post-metadata">

**Author:** ![guimaraesvictor](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/guimaraesvictor/32/3441_2.png) [@guimaraesvictor](https://ask.openrouteservice.org/u/guimaraesvictor)\
**Post date:** [January 17, 2025, 12:36am UTC](https://ask.openrouteservice.org/t/maximum-distance-parameter/6821/7 "2025-01-17T00:36:49Z")

</div>

@jschnell sure!  
this is my docker-compose.yml:

```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

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:
      - "8080:8082" # Expose the ORS API on port 8080
      - "9001:9001" # Expose additional port for monitoring (optional)
    image: openrouteservice/openrouteservice:v9.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
    environment:
      REBUILD_GRAPHS: False # Set to True to rebuild graphs on container start.
      CONTAINER_LOG_LEVEL: INFO # 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: 1g # start RAM assigned to java
      XMX: 16g # 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.endpoints.maximum_range_distance: 1000000
      ors.endpoints.isochrones.maximum_range_distance_default: 1000000
      #ors.engine.profile_default.build.source_file: /home/ors/files/brazil-latest.osm.pbf
      #ors.engine.profile_default.service.maximum_distance: 1000000
      #ors.engine.profile_default.graph_path: /home/ors/graphs
      #ors.engine.elevation.cache_path: /home/ors/elevation_cache
      #ors.engine.profiles.car.enabled: true
      #logging.level.org.heigit: INFO

    # ----------------- 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:

```

This is my ors-config.yml:

```yml
################################################################################################
### Minimal configuration example file for openrouteservice. For a description please visit: ###
### https://giscience.github.io/openrouteservice/run-instance/configuration/ ###
################################################################################################
ors:
  engine:
    profile_default:
        service:
            maximum_distance: 1000000
            maximum_distance_dynamic_weights: 1000000
            maximum_distance_avoid_areas: 1000000
        build:
            source_file: /home/ors/files/example-heidelberg.test.pbf  
    profiles:
      driving-car:
        enabled: true
    endpoints:
       isochrones:
        enabled: true
        allow_compute_area: true
        maximum_range_distance_default: 1000000
        maximum_range_distance:
           - profiles: driving-car
             value: 1000000
        maximum_range_time_default: 18000
        maximum_range_time:
           - profiles: driv
################################################################################
### Configuration file for openrouteservice. For a description please visit: ###
### https://giscience.github.io/openrouteservice/run-instance/configuration/ ###
################################################################################
##### 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: openrouteservice.org, OpenStreetMap contributors, tmc - BASt
# gpx_name: ORSRouting
# gpx_description: This is a directions instructions file as GPX, generated from openrouteservice
# gpx_base_url: https://openrouteservice.org/
# gpx_support_mail: support@openrouteservice.org
# 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: openrouteservice.org, 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: openrouteservice.org, 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: 3600
# 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: openrouteservice.org, 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
# 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.<profile> #####
# profiles:
# driving-car:
# encoder_name: driving-car
# build:
# encoder_options:
# turn_costs: true
# block_fords: false
# use_acceleration: true
# 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
# 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
# ext_storages:
# WayCategory:
# WaySurfaceType:
# HillIndex:
# TrailDifficulty:
# cycling-mountain:
# encoder_name: cycling-mountain
# build:
# encoder_options:
# consider_elevation: true
# turn_costs: true
# block_fords: 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
# ext_storages:
# WayCategory:
# WaySurfaceType:
# HillIndex:
# TrailDifficulty:
# cycling-electric:
# encoder_name: cycling-electric
# build:
# encoder_options:
# consider_elevation: true
# turn_costs: true
# block_fords: false
# ext_storages:
# WayCategory:
# WaySurfaceType:
# HillIndex:
# TrailDifficulty:
# foot-walking:
# encoder_name: foot-walking
# build:
# encoder_options:
# block_fords: false
# ext_storages:
# WayCategory:
# WaySurfaceType:
# HillIndex:
# TrailDifficulty:
# foot-hiking:
# encoder_name: foot-hiking
# build:
# encoder_options:
# block_fords: false
# ext_storages:
# WayCategory:
# WaySurfaceType:
# HillIndex:
# TrailDifficulty:
# wheelchair:
# encoder_name: wheelchair
# build:
# encoder_options:
# block_fords: true
# 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
# elevation: true
# gtfs_file: ./src/test/files/vrn_gtfs_cut.zip
# service:
# maximum_visited_nodes: 1000000

```

---

<div class="post-metadata">

**Author:** ![jschnell](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/jschnell/32/971_2.png) [@jschnell](https://ask.openrouteservice.org/u/jschnell)\
**Post date:** [January 17, 2025, 10:52am UTC](https://ask.openrouteservice.org/t/maximum-distance-parameter/6821/8 "2025-01-17T10:52:44Z")

</div>

Hey,

you have configured `ors.engine.endpoints` where it should be `ors.endpoints`, i.e. you have to decrease the indentation of your `endpoints`-section of the config.

Best regards

---

<div class="post-metadata">

**Author:** ![guimaraesvictor](https://ask.openrouteservice.org/user_avatar/ask.openrouteservice.org/guimaraesvictor/32/3441_2.png) [@guimaraesvictor](https://ask.openrouteservice.org/u/guimaraesvictor)\
**Post date:** [January 17, 2025, 9:32pm UTC](https://ask.openrouteservice.org/t/maximum-distance-parameter/6821/9 "2025-01-17T21:32:42Z")

</div>

@jschnell IT WORKED! Sorry for the silly mistake, but thank you a lot for your time to help me!
