Report query timing and reliability in the R client, bump to 1.4.9000
- bump the version to the dev version 1.4.9000
- measure the client-side duration of every API request and report it
as a queryDuration column (and in the verbose log)
- warn when the server cut a search short (timeExceeded) or when a
request failed, instead of silently returning 0 counts
- disable the curl low-speed abort, which kills transfers with less
than 1 byte/s after 600s regardless of the request timeout
Change-Id: I841e928ce07e56b00ad794022343044595f0db47
diff --git a/R/KorAPConnection.R b/R/KorAPConnection.R
index 967feaa..27d7b15 100644
--- a/R/KorAPConnection.R
+++ b/R/KorAPConnection.R
@@ -438,8 +438,12 @@
}
# Create the request
+ # disable the curl low-speed abort (r-curl kills "stalled" transfers
+ # with less than 1 byte/s after 600s by default): long running
+ # searches are guarded by the overall request timeout instead
req <- httr2::request(url) |>
httr2::req_user_agent(kco@userAgent) |>
+ httr2::req_options(low_speed_limit = 0, low_speed_time = 0) |>
httr2::req_timeout(timeout)
if (!is.null(kco@oauthClient)) {