Request parameters exceed the server configuration limits


#1

Hello.

I’m trying to compute a pairwise distance matrix. Apparently I’ve exceeded the total of routes are allowed by configuration. My API call consists of 597 locations, which means 356409 routes computation. I’ve made the corresponding changes in the config file (or so I think).

Config (app.config):

{
   "ors":{
     "info": {
       "base_url": "https://openrouteservice.org/",
       "support_mail": "support@openrouteservice.org",
       "author_tag": "openrouteservice",
       "content_licence": "LGPL 3.0"
      },
      "services":{
         "matrix":{
            "enabled":true,
            "maximum_locations":4000000,
            "maximum_visited_nodes":100000,
            "allow_resolve_locations":true,
            "attribution":"openrouteservice.org, OpenStreetMap contributors"
         },
         "isochrones":{
            "enabled":true,
            "maximum_range_distance":[
               {
                  "profiles":"any",
                  "value":50000
               },
               {
                  "profiles":"driving-car, driving-hgv, cycling-regular, foot-walking",
                  "value":100000
               }
            ],
            "maximum_range_time":[
               {
                  "profiles":"any",
                  "value":18000
               },
               {
                  "profiles":"driving-car, driving-hgv, cycling-regular, foot-walking",
                  "value":3600
               }
            ],
            "maximum_intervals":10,
            "maximum_locations":2,
            "allow_compute_area":true,
            "attribution":"openrouteservice.org, OpenStreetMap contributors"
         },
         "routing":{
            "enabled":true,
            "mode":"normal",
            "sources":[
               "/ors-core/data/north-america-latest.osm.pbf"
            ],
            "init_threads":1,
            "attribution":"openrouteservice.org, OpenStreetMap contributors",
            "distance_approximation":true,
            "profiles":{
               "active":[
                   "vehicles-car"
               ],
               "default_params": {
                   "encoder_flags_size": 8,
                   "graphs_root_path": "data/graphs",
                   "elevation_provider": "multi",
                       "elevation_cache_path": "data/elevation_cache",
                   "elevation_clear_cache": true,
                   "instructions": true,
                   "maximum_distance": 100000,
                   "maximum_segment_distance_with_dynamic_weights": 100000,
                   "maximum_waypoints": 50
               },
               "profile-vehicles-car":{
                  "profiles":"driving-car",
                  "parameters":{
                     "encoder_options":"consider_elevation=true|turn_costs=true|block_fords=false|use_acceleration=true",
                     "elevation":true,
                     "preparation":{
                        "min_network_size":200,
                        "min_one_way_network_size":200,
                        "methods":{
                           "ch":{
                              "enabled":true,
                              "threads":8,
                              "weightings":"fastest"
                           },
                           "lm":{
                              "enabled":true,
                              "threads":8,
                              "weightings":"fastest,shortest",
                              "landmarks":24
                           }
                        }
                     },

Erro message:

openrouteservice.exceptions.ApiError: 400 ({'info': {'timestamp': 1559749512432, 'engine': {'build_date': '2019-06-01T20:46:11Z', 'version': '5.0.1'}}, 'error': {'code': 6004, 'message': 'Request parameters exceed the server configuration limits. Only a total of 356409 routes are allowed.'}})

What could I be doind wrong?
Thank you in advance.


#2

@ryuzakyl what is the maximum of locations that still works?


#3

Can you try the latest master branch @ryuzakyl? I introduced a fix for matrix wrt to limits last week:

Note though, that you’ll have to adapt your app.config. Oh wait, that might the problem… Did you pull the latest master recently and didn’t change your app.config? See the note at the bottom of the PR comment linked above, that should fix it.


#4

Hi @timothy.

The the maximum amount of locations currently working is 50. For any number of locations greater than 50, I get the following error message:

openrouteservice.exceptions.ApiError: 400 ({'info': {'engine': {'build_date': '2019-06-01T20:46:11Z', 'version': '5.0.1'}, 'timestamp': 1559765930590}, 'error': {'code': 6004, 'message': 'Request parameters exceed the server configuration limits. Only a total of 3025 routes are allowed.'}})

Perhaps I should update some configurations in the app.config file. Any advice?
Thanks in advance.


#5

That’s why I’m referring to. Please follow my advice and let us know if it worked.


#6

Hi @nils.

It works!!! Thank you very much :wink:.

I apologize for failing to carefully read your previous response.

Thanks once again.
Best regards.


#7

Very nice, glad to hear that :slight_smile: