0

On OSRM I try to match 500 locations by url, but get the error below:

Request-URI Too Long
The requested URL's length exceeds the capacity limit for this server.
Apache/2.4.52 (Ubuntu) Server at 127.0.1.1 Port 80

Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
bachgri
  • 1
  • 2

1 Answers1

1

You can try POST requests instead of GET, that should work according to this issue:

https://github.com/Project-OSRM/osrm-backend/issues/1293

If you are hosting the OSRM instance yourself, you can also increase the limit in Apache by increasing the configs:

LimitRequestLine 10000
LimitRequestFieldSize 4000
Alex
  • 32,506
  • 16
  • 106
  • 171
  • 1
    HTTP POST is [not supported](https://github.com/Project-OSRM/osrm-backend/pull/2182) by OSRM backend API. Besides increasing the Apache limits you will have to use the `--max-matching-size` parameter for osrm-routed as described at https://gis.stackexchange.com/a/458227/222231 – Alexander Farber Apr 24 '23 at 19:16