TimeOut-Error for Isochrones-request on self-hosted instance

I am trying to get Isochrones for 600+km. Unfortunately I keep getting the following Error, when requesting over ~150km Isochrones - I am guessing it is taking too long and therefor fails. I checked client.py, etc. to somehow raise the time before a timeout happens, but could not find a way to do so. I tried googling and searching this forum, but could not get there…

Traceback (most recent call last):
File "C:/Users/Lu/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\common\client.py", line 162, in request
blocking=True)
File "C:/Users/Lu/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\common\networkaccessmanager.py", line 262, in request
raise self.exception_class(self.http_call_result.reason)
ORStools.common.networkaccessmanager.RequestsExceptionTimeout: Network error: Operation abgebrochen

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/Lu/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\isochrones_layer_proc.py", line 240, in processAlgorithm
response = clnt.request('/v2/isochrones/' + profile, {}, post_json=params)
File "C:/Users/Lu/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\common\client.py", line 166, in request
raise exceptions.Timeout
ORStools.utils.exceptions.Timeout

Can you possibly hint me in the right direction?

@onkel_butterbrot,

I assume you are using a local ors backend, because that distance is not supported by our official API:
https://openrouteservice.org/restrictions/

Please take a look at this pull request which implements timeouts per provider:

With this you should be able to edit your local ors-tools plugin files to disable the timeout.

The pull isn’t included yet due to requested changes.

Best regards

Thanks for your quick response - looks promising.

When editing my files as described in the pull request, I am getting the following error:

Traceback (most recent call last):
File "C:/Users/Lu/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\common\client.py", line 162, in request
blocking=True)
File "C:/Users/Lu/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\common\networkaccessmanager.py", line 260, in request
raise self.http_call_result.exception
ORStools.common.networkaccessmanager.RequestsException: Network error: Im Ablauf des SSL-Protokolls ist ein Fehler aufgetreten.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/Lu/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\isochrones_layer_proc.py", line 240, in processAlgorithm
response = clnt.request('/v2/isochrones/' + profile, {}, post_json=params)
File "C:/Users/Lu/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\common\client.py", line 171, in request
self._check_status()
File "C:/Users/Lu/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\common\client.py", line 224, in _check_status
if 400 <= status_code < 500:
TypeError: '<=' not supported between instances of 'int' and 'NoneType'

Ausführung nach 0.05 Sekunden gescheitert

I double checked if I edited according to pull. Would a quick fix be setting this:

  def __init__(self,
                     provider=None,
                     retry_timeout=60):

to

 def __init__(self,
                 provider=None,
                 retry_timeout=7200):

?

Brg Onkel

Hey,

yes, I’d assume that that should work. Let us know whether it does :wink:

Will do once I get the above error fixed - I can’t get rid of it now.

Before editing the files I could at least run it - now I’m getting the network error… frustrating

I tried reinstalling, using an earlier version of ORS Tools, etc. - nothing helps

This might be an issue with your local backend then.
You should be able to see the full request body in the Plugin log.
Maybe try sending it directly to your local backend through the api (localhost:8082/ors/v2/isochrones,
you could e.g. just generate a curl example in the API playground and replace the body and url with your example and the local host)

If you get the same error it should be a problem with the backend configuration and be treated seperately

1 Like

I figured it out this moment - I have before, but it’s been a while. I had to use http instead of https :wink:

2 Likes

:expressionless: right, there was the ssl part in the error above and you send to localhost…
good it works now :slight_smile:

1 Like

Got it to work now, with jannefleischer’s pull request - thanks guys for your help! :slight_smile:

1 Like