Performance issues with STAC API for bbox query

96 views
Skip to first unread message

Chris Bürgi

unread,
May 22, 2025, 4:36:06 PMMay 22
to GeoAdminCh API
Hi,

we noticed that bounding box query in the STAC API the response times for the initial, uncached requests currently take between 3.5 - 4.5 seconds. The same request was in the 200-300ms a month or so ago. Certainly it was much faster than currently. Also if no bounding box is used, the requests are answered very fast (in the hundred milliseconds or even less, not seconds).

Here an example of a slow request:
https://data.geo.admin.ch/api/stac/v0.9/collections/ch.swisstopo.swisssurface3d/items?bbox=8.953848163226536,46.013968847163724,8.967008036144481,46.02278813937472
(After the first execution the request is cached for a moment and returns very fast. In this case just change the bbox parameters slightly to have a slow request again.)

And here a request without the "bbox" query parameter that is way faster:
https://data.geo.admin.ch/api/stac/v0.9/collections/ch.swisstopo.swisssurface3d/items

This seems to be the case for any collection (tested a few).

If you need additional information please let me know.

Best regards,
Chris

Benoit Regamey

unread,
May 26, 2025, 6:43:49 AMMay 26
to GeoAdminCh API
Hi Folks,

We even noticed that if the BBOX is really small (e.g. 10x10 meters), the response time is in the 15-30 seconds range ! I guess that sometimes it even hits the timeout threshold because we randomly get 500 server error responses.


All the best,
Benoit

GeoAdminCh API

unread,
May 27, 2025, 9:53:44 AMMay 27
to GeoAdminCh API
Hi Chris and Benoit,

Thanks for reporting this. We had not noticed this ourselves but you are right that indeed a bbox query to /search takes longer than expected.

If it's not a bug it might also be related to higher workloads on the database due to MeteoSchweiz' publishing their data via our infrastructure since May 22th, see their press release from last week. We are looking into this and report back to you when we know the root cause.

GeoAdminCh API

unread,
Jul 1, 2025, 10:03:41 AMJul 1
to GeoAdminCh API
Hello again,

The response times of the endpoints /collections/*/items=bbox=* and /search?bbox=* are back to normal since June 18th.
With the onboarding of MeteoSchweiz, we have been experiencing scaling issues. The elevated latency of the bbox searches is a symptom of these issues. This is now mitigated. Please let us know if you still see elevated latency for these requests.
We continue working on long term improvements to keep the performance of our systems acceptable in the face of growing load.

Thanks again for reporting this!
Reply all
Reply to author
Forward
0 new messages