rdflib.js icon indicating copy to clipboard operation
rdflib.js copied to clipboard

Timeouts - change default timeout in fetcher from 30s to 2min

Open timbl opened this issue 4 years ago • 6 comments

This is to avoid spurious timeouts called on things which in the end come though, when the net becomes slow for example, or for users on a slow link.

timbl avatar Nov 06 '20 12:11 timbl

Responds to https://github.com/linkeddata/rdflib.js/issues/455

timbl avatar Nov 06 '20 12:11 timbl

Hm, is this for one single http roundtrip? When using generators this might be desirable, but when awaiting a result, 2 minutes seems like a lot. rdflib is used in many places. We can choose any default we want, as long as it's well documented. For instance in the test-suite, I would overwrite that back to 30 seconds, probably.

michielbdejong avatar Nov 06 '20 12:11 michielbdejong

The user can easily override the timeout setting if needed. Erring on the long side seems preferable to too short a timeout. I suppose that the timeout could be overwritten in the global solidFetcher to reset the timeout everywhere for apps that create multiple fetchers?

jeff-zucker avatar Nov 18 '20 16:11 jeff-zucker

Hm, but what about my comment in https://github.com/linkeddata/rdflib.js/issues/455#issuecomment-723077526 / https://gitter.im/solid/solidcommunity.net?at=5fa54c68c10273610aeca65a ?

michielbdejong avatar Nov 18 '20 16:11 michielbdejong

"One single http round trip" isn't of course a singe IP round trip, as it can have all the TLS setup time, and CORS prefetches... it also can be delayed by the browser by being put in a pending state for a while. So when all this happens n a slow link, it is frustrating when the data actually eventually arrives but the client has given up and ignored it.

timbl avatar Nov 21 '20 21:11 timbl

Yes, agreed that the fetch with the server should be set shorter ... maybe the thing to do is to cover the whole service of one incoming request, not each individual outgoing one. Would be good to to tell the client in the 500 response what it was doing when it gave up of course.

timbl avatar Nov 21 '20 21:11 timbl