osrm icon indicating copy to clipboard operation
osrm copied to clipboard

Curl Header Overflow for Large Distance Matrices

Open SebKrantz opened this issue 10 months ago • 3 comments

Hello, thanks for a great package!

I am running OSRM on my own server and want to compute a 12,000 x 12,000 distance matrix. I get the following error from osrmTable():

result <- osrmTable(loc = qDF(slt(calib_data, lon, lat)), measure = c('duration', 'distance'))

#> Error: Error in curl::curl_fetch_memory(utils::URLencode(url), handle = req_handle) : 
#>   Failed sending HTTP request: Header overflow

I have managed to solve this error by globally increasing the curl header size on the server e.g.

export CURL_MAX_HTTP_HEADER=1024000000

But it would be better if this could be included in the curl handle, e.g. by adding an ellipsis (...) argument to osrmTable() and passing it down to curl::handle_setopt. Thanks.

SebKrantz avatar Aug 21 '23 16:08 SebKrantz