OGC API handling timeouts

I am wondering if the OGC API is capable of handling timeouts.
For example, in case there is no response from sentinel-hub for some reasons in 10 seconds after requesting WMS GetMap as
what will be happened? Any handling methods available? Is this detectable and controllable by user application? If not, what is the best way when this is happened?

Yes, this parameter is actually a part of package configuration and can easily be regulated by a user:

  • You can set it globally in the package configuration file:
sentinelhub.config --download_timeout_seconds 10
  • or only for your current instance of config object:
from sentinelhub import SHConfig

config = SHConfig()
config.download_timeout_seconds = 10

This parameter is then passed to timeout parameter in underlying requests package (docs).

By default download_timeout_seconds is set to 120 seconds which is a lot. So you can always decide to change it to a smaller number.

1 Like

For regulating timeouts, is python package required?
Because we have been trying to implement our application in simple way with OGC API WMS, it is appreciated if no additional package installation required.

Hi @h-ohno,
typical (e.g. 512x512 px) WMS GetMap request will take 0.5-1 seconds. However, if you are requesting very large areas, e.g. 2500x2500px, it might take more than 10 seconds to process the result.
OGC standard by itself does not handle timeout. It is a simple HTTPS request and it will timeout after 60-120 seconds (depending on your network settings).

1 Like