Too many locations in matrix request


Hello everyone,

I am using the openrouteservice for some weeks now in our new project at Logenios. We’ve set up our own ORS core version 4.7.0.

The project is in development phase, the openrouteservice is used to give us ETAs via the matrix service and we are observing its behaviour if it suits our needs. Today we had a request to the ORS that contained 16 stops/locations and got the following error:
{“error”:{“code”:6004,“message”:“Parameter ‘sources/destinations=256’ is out of range. Maximum possible value is 200.”},“info”:{“engine”:{“version”:“4.7.0”,“build_date”:“2019-02-05T13:38:12Z”},“timestamp”:1553174487609}}

I assumed that when I set to a higher value this problem would disappear. But somehow either the service does not use the provided value in the config, or it is the wrong value I adjusted. Is it correct that adjusting the config and then running “sudo docker compose up -d” again should recognize any changes in my config?

The relevant part of my config now looks like this:
“attribution”:“, OpenStreetMap contributors”

and the request would be “OURDOMAIN/ors/matrix?profile=driving-hgv&locations=9.77967,51.39555%7C9.9714858,53.47052%7C9.77165,50.08842%7C9.26608,49.50243%7C10.09289,49.43469%7C9.8791,49.2331%7C9.84944,49.11687%7C9.82962,49.11401%7C9.83938,49.10301%7C9.82591,49.06871%7C9.96819,48.84021%7C10.26906,48.92054%7C10.2897,48.88571%7C10.40619,48.92305%7C10.71539,48.87147%7C10.245,49.118”

Any help would be appreciated.


Hi @logenios,

it might be to do with if “dynamic routing” is being used which is dependent on a number of factors from both the app.config and the request itself. If it is using that, then it would also need a maximum_locations_flexible parameter in the app.config.