epimorphics / qonsole

A simple console for running SPARQL queries and displaying results
Other
16 stars 2 forks source link

Allow specification of a query timeout on a per endpoint basis #21

Open bwmcbride opened 7 years ago

bwmcbride commented 7 years ago

The use case here concerns develop long running test queries for a service. The service supports two query endpoints - the production endpoint with a short default timeout and a second endpoint which allows timeout overrides.*

It is convenient when developing test queries to use the qonsole form accessing the test endpoint, but the queries need to be sent to the endpoint with a timeout override. It would be useful to be able to configure the timeout value in the Qonsole configuration of the endpoint. In some cases it may also be desirable to be able to enter a timeout value in the form.

paperclipmonkey commented 6 years ago

Would support for cancelling requests #24 support this use-case adequately @bwmcbride ?

bwmcbride commented 6 years ago

In the case of queries going to Fuseki, I don't think cancelling the request gets as far as Fuseki so the long running query continues to run inside the server. Setting a small number of such queries running can saturate a server.

Setting a timeout on the query does cause it to terminate on the server.

So being able to set timeouts is still desirable.

Its not high priority though. There was a period during the EPO project when it would have been handy. The client was forced to use curl instead. But that is not a live issue at the moment.

paperclipmonkey commented 6 years ago

Is this a header sent to fuseki that sets the timeout length?

On Thu, 23 Aug 2018, 16:39 bwmcbride, notifications@github.com wrote:

In the case of queries going to Fuseki, I don't think cancelling the request gets as far as Fuseki so the long running query continues to run inside the server. Setting a small number of such queries running can saturate a server.

Setting a timeout on the query does cause it to terminate on the server.

So being able to set timeouts is still desirable.

Its not high priority though. There was a period during the EPO project when it would have been handy. The client was forced to use curl instead. But that is not a live issue at the moment.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/epimorphics/qonsole/issues/21#issuecomment-415463247, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBXiwzHsgRJvOjGpPlWQxTNbvO_vGE7ks5uTsyzgaJpZM4PipJ- .

bwmcbride commented 6 years ago

The timeout can be set in a header ('Timeout:') or a query parameter('&timeout=') There are two formats for the timeout value:

1000 10000,60000

The first is a single overall timeout value in ms.

The second two numbers are also in milliseconds; the first number is max time to first result; the second number is the time to complete the query.