Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend description of timeout parameter #66

Closed
SlowMo24 opened this issue Oct 26, 2020 · 6 comments · Fixed by #73
Closed

Extend description of timeout parameter #66

SlowMo24 opened this issue Oct 26, 2020 · 6 comments · Fixed by #73
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@SlowMo24
Copy link
Contributor

The description in api.ohsome.org

timeout – custom timeout to limit the processing time in seconds; default: empty

is misleading. One the one hand a server side max-timeout applies (that might be documented at /metadata ) on the other the default is not 'empty' but 'some number'.

@FabiKo117 FabiKo117 added the documentation Improvements or additions to documentation label Oct 27, 2020
@FabiKo117
Copy link
Contributor

I think the first sentence describes the usage of this parameter pretty good. The issue with the timeout is that, as far as I know, it can vary e.g. depending on the used network. In the current implementation, the timeout is set via a startup parameter (and I think it's set to 7 minutes, am I right @joker234 ?), so it can also vary. Therefore I would not write a fixed number in here in the parameter description, but your suggestion to retrieve this info through /metadata is a good one 👍 .

@SlowMo24
Copy link
Contributor Author

currently, if I set a too large timeout I get the restriction as response (600 seconds). So communicating to the user that she is not free to choose any timeout but limited to server setting might be a good idea.

@FabiKo117
Copy link
Contributor

Ok, then it's 10 minutes :D
But explain to me why someone would set an even higher timeout? That does not make sense to me.

I'd suggest the following description then:

timeout - custom timeout to limit the processing time in seconds; default: dependent on server settings, retrieveable through a /metadata request

@joker234
Copy link
Member

joker234 commented Oct 27, 2020

Correct, 10 minutes is set, but you cannot expect that you get appropriate responses waiting 10 minutes. Some network components (outside of our scope) may restrict HTTP requests to a smaller timeout.

@SlowMo24
Copy link
Contributor Author

@FabiKo117 the timeout is just to prevent overusage of our 'cluster', right? a longer timeout would mean one could run more complex queries (e.g. count relations in Kurpfalz, not possible with current timeout)

@FabiKo117
Copy link
Contributor

The short answer is "yes". But as @joker234 already stated, depending on the network, an HTTP connection might not be open for too long regardless on what we define internally as the timeout, or what the user defines here, if it goes in the duration of several minutes.

We've added this parameter so that the user can specify an upper boundary for the processing time of the request. So if he/she reaches the custom timeout, there are two options: increase the limit, or check and inform yourself on why it takes so long (maybe too coarse filtering, API currently busy, etc.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants