GIScience / orstools-qgis-plugin

Plugin for QGIS with a set of tools to use openrouteservice API´s, based on openstreetmap
https://plugins.qgis.org/plugins/ORStools/
MIT License
98 stars 31 forks source link

Add option to set timeout when creating a provider #122

Closed rabidllama closed 2 years ago

rabidllama commented 3 years ago

Here's what I did

Often people use a local instance of openrouteservice for complex requests that exceed the limits of the standard openrouteservice API (e.g. large matrix requests). When such requests are made it is often the case that they can take some time to complete.


Here's what I got

After some default time, an exception is returned that there was a timeout.


Here's what I was expecting

When running a self hosted instance, the timeout should be longer to accomadate the longer duration needed for complex processes


Here's what I think could be improved

It would be good to be able to specify an override to the default timeout value when users make use of a local install. This could be set in the configuration area when the custom location is setup or edited

jannefleischer commented 3 years ago

I already implemented that a couple of weeks ago. Just waiting for a merge. https://github.com/GIScience/orstools-qgis-plugin/pull/121 - until than you can install from my branch manually.

Though additionally your webserver must be configured correct to keep the connection running long enough. My apache who just works as a proxy for my dockers had a limit of 300seconds (which seems to be the default). In ubuntu 20.04 it can be set in /etc/apache2/apache2.conf as timeout = 300.

ThePieMonster commented 2 years ago

@koebi Is there a plan to get a configurable timeout in place soon?

koebi commented 2 years ago

Hey, yes, indeed. We're currently implementing the routing options (avoid features, borders and the like). Once that's done, we'll see about merging the PR by @jannefleischer that has been laying around for way too long :( Expect results within the month :)