-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation for retry configuration in pystac-client and enable them by default #520
Comments
I wonder if this is the same as custom certificates? Something like from pystac_client.stac_api_io import StacApiIO
from pystac_client.client import Client
from requests.adapters import HTTPAdapter, Retry
stac_api_io = StacApiIO()
retries = Retry(total=5, backoff_factor=1, status_forcelist=[ 502, 503, 504 ])
stac_api_io.session.mount(
"http://", HTTPAdapter(max_retries=retries)
)
client = Client.open("https://planetarycomputer.microsoft.com/api/stac/v1", stac_io=stac_api_io) |
Don't see why that wouldn't work, but since we're a network-y library, I think it'd make sense to add retries as a configuration option to FYI here's the relevant bits of the |
The catalog was found to occasionally not be reachable and the pystac-client library does not yet offer an option to increase timeout or retry. However, this is about to change in later versions: stac-utils/pystac-client#520.
The issue `https://github.com/stac-utils/pystac-client/issues/520` is closed: The default retries are set for timeouts but not for `50x` responses. Thus the code is left as is.
Issue `stac-utils/pystac-client#520 is closed. But can not yet be used with currently supported python version. Added reminder for future versions.
Please refer the API error issue for the problems faced.
The text was updated successfully, but these errors were encountered: