Quota not being reset?

I’m on a free plan, so should be getting 2,500 requests per day. My key’s data usage shows that I made 751 requests three days ago, 747 two days ago, and 44 today (for a total of 1,542 requests) – this seems right to me. BUT the dashboard also shows that I’ve used 2,459 of my 2,500 for the day. I might not quite understand how the quota is supposed to work, but something isn’t adding up here.

I’m using the QGIS plugin. Does an isochrone query count as a single request for each point, for each distance listed in the range?

Greetings @cimar this basically means you have 2459 left of 2500. Cheers, Tim

Ah! OK. The QGIS console is throwing an OverQueryLimit error, even though I’ve metered the querying to 20 calls per minute in settings, so I don’t think I should be hitting the rate limit. If I haven’t actually hit my quota, what’s going on here?

Here’s the error trace:

OverQueryLimit: Wait for 9 seconds
OverQueryLimit: Wait for 1 seconds
OverQueryLimit: Wait for 0 seconds
Traceback (most recent call last):
File “C:/Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\core\client.py”, line 158, in request
result = self._get_body(response)
File “C:/Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\core\client.py”, line 214, in _get_body
error
ORStools.utils.exceptions.OverQueryLimit: 429 (Rate limit exceeded)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:/Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\core\client.py”, line 158, in request
result = self._get_body(response)
File “C:/Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\core\client.py”, line 214, in _get_body
error
ORStools.utils.exceptions.OverQueryLimit: 429 (Rate limit exceeded)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:/Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\proc\isochrones_proc.py”, line 249, in processAlgorithm
response = clnt.request(provider[‘endpoints’][self.ALGO_NAME], params)
File “C:/Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\core\client.py”, line 172, in request
return self.request(url, params, first_request_time, requests_kwargs, post_json)
File “C:/Users/USER/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ORStools\core\client.py”, line 170, in request
time.sleep(sleep_for)
ValueError: sleep length must be non-negative

Execution failed after 64.52 seconds

The last error reveals what’s happening. It’s a sorta bug, I need to get rid of the option to set the quota yourself. Problem is, when there’s long requests that take multiple seconds, it can try to sleep for a negative amount of time.

Don’t think I have a quick fix for you. But I’ll try to get to this within the week.

Issue:

Cheers
Nils

1 Like

This is a hack, but setting the rate limit way higher than it should be (120 per minute) seems like a viable workaround.

Yeah, I was about to suggest the same. Wasn’t sure though if it would throw a OverQueryLimitError in that case or considerably slow down your analysis by extended sleep()s. But good to know, I’ll put it in the Github issue as workaround. Thx.