Increase the number of routes in the matrix

Hello all,

Hope you’re all alright

I’m trying for multiples days to increase my limit of routes in the matrix. I’m using OpenRouteService with Docker therefore I’m using the ors-config.yml that is located in the docker/conf/ file

Here is my ors-config.yml

##### openrouteservice settings file #####
# This file contains parameters for openrouteservice.
# For a full list of possible parameters see documentation, below are some examples.

### uncomment the following lines to turn on debug output
#logging:
#  log4j2:
#    config:
#      override: classpath:logs/DEBUG_LOGGING.json

ors:
  ### uncomment the following lines to change CORS settings.
  #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
  engine:
    ### use the following line for development setup using test OSM file for Heidelberg
    #source_file: ./src/test/files/heidelberg.osm.gz
    source_file: ./ors-core/data/merged.osm.pbf
    graphs_root_path: ./ors-core/data/graphs
    elevation:
      cache_path: ./ors-core/data/elevation_cache

    services:
      matrix:
        maximum_routes: 100000

    profiles:
      car:
        profile: driving-car
        elevation: true
        maximum_distance: 100000000
        encoder_options:
          turn_costs: true
          block_fords: false
          use_acceleration: true
        preparation:
          min_network_size: 200
          min_one_way_network_size: 200
          methods:
            ch:
              enabled: true
              threads: 1
              weightings: fastest
            lm:
              enabled: false
              threads: 1
              weightings: fastest,shortest
              landmarks: 16
            core:
              enabled: true
              threads: 1
              weightings: fastest,shortest
              landmarks: 64
              lmsets: highways;allow_all
        execution:
          methods:
            ch:
              disabling_allowed: true
            lm:
              disabling_allowed: true
              active_landmarks: 6
            core:
              disabling_allowed: true
              active_landmarks: 6
        ext_storages:
          WayCategory:
          HeavyVehicle:
          WaySurfaceType:
          RoadAccessRestrictions:
            use_for_warnings: true

I know that it’s correctly taken into account as I’ve change the map I want to use and increase the maximum_distance

Now when running it I’m encounter always
Response: {‘error’: {‘code’: 6004, ‘message’: ‘Request parameters exceed the server configuration limits. Only a total of 2500 routes are allowed.’}, ‘info’: {‘engine’: {‘build_date’: ‘2023-11-03T14:59:37Z’, ‘version’: ‘8.0’}, ‘timestamp’: 1699285049876}}

While I tried to modify it and integrate the “services > matrix > maximum_routes” it seems to not be taken into account

Can someone help me with this matter

Hi,
sorry we’re behind with properly documenting the new configuration setup. The location for the setting you are looking for should be endpoints.matrix.maximum_routes. In YAML:

endpoints:
  matrix:
    maximum_routes: 2500

Hope this helps.