Request parameters exceed the server configuration limits



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

     "info": {
       "base_url": "",
       "support_mail": "",
       "author_tag": "openrouteservice",
       "content_licence": "LGPL 3.0"
            "attribution":", OpenStreetMap contributors"
                  "profiles":"driving-car, driving-hgv, cycling-regular, foot-walking",
                  "profiles":"driving-car, driving-hgv, cycling-regular, foot-walking",
            "attribution":", OpenStreetMap contributors"
            "attribution":", OpenStreetMap contributors",
               "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

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.


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


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.


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.


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


Hi @nils.

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

I apologize for failing to carefully read your previous response.

Thanks once again.
Best regards.


Very nice, glad to hear that :slight_smile: