Closed yarikoptic closed 4 months ago
@yarikoptic FYI, there's no need to include --reject "index.html*"
in the wget
command, as dandidav
does not serve any index.html
files (aside from any that might exist inside a Dandiset).
So we might want to robustify interaction with DANDI APIU
Robustify how? If you mean retrying until the API request succeeds, I disagree, as that would slow down responses; if the end-user is OK with such slowdown, they should be the ones doing the retrying when making requests to dandidav
.
So we might want to robustify interaction with DANDI APIU
Robustify how? If you mean retrying until the API request succeeds, I disagree, as that would slow down responses; if the end-user is OK with such slowdown, they should be the ones doing the retrying when making requests to
dandidav
.
We should retry at least upon 5xx for a few times. IMHO it is better to cause a slow down but likely to address the unstable connection/operation: dandidav here is a "client" to the dandi-api. Just propagating 500s we are adding to their possibility to occur in the long(er) chain of such services happen something else is building atop of dandidav, unless dandidav takes effort to mitigate.
Interestingly, apparently wget
claims to also retry on such (?) cases, since
-t number
--tries=number
Set number of tries to number. Specify 0 or inf for infinite retrying. The default is to retry 20
times, with the exception of fatal errors like "connection refused" or "not found" (404), which
are not retried.
if I understand "default is to retry" here, but I don't remember if it did retry to us here.
@yarikoptic
I would expect it to be intermittent so could be 4 retries with 2**(retry-1)
seconds in between (0, 2, 4, 8)
for 5xx -- let's do for any
@TheChymera wanted "simpler" way to download danidisets. So I tried to provide ultimate
wget
invocation against webdav instance but got into 500:on server side logs -- seems a query to dandi API failed
and indeed rerunning that command worked just fine. So we might want to robustify interaction with DANDI APIU