Skip to content
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

Feature request: system health and system load call #158

Open
CecSve opened this issue Feb 13, 2025 · 1 comment
Open

Feature request: system health and system load call #158

CecSve opened this issue Feb 13, 2025 · 1 comment

Comments

@CecSve
Copy link

CecSve commented Feb 13, 2025

This is originally a message to helpdesk - posting here to share the request:

I am working a lot with the gbif API and when I encountered a failed search query due to a partial outage of gbif I
wondered whether it is possible to request the systems health status via pygbif.
I did not find an easy way to do this. I think it would be nice to have an API call for the system health and system load to
automatically check when using the system is save and plan tasks accordingly.

You are probably rather busy currently due to the migration. So, I do not expect an implementation soon.
This is just a suggestion for future improvements.

@MattBlissett
Copy link
Member

The HTTP response codes to API requests could be used by pygbif and others to cope with an outage, whether that's a single failed query or a temporary problem with GBIF's servers.

Response code 429 means the client should reduce the rate at which it is sending requests. This is specific to the client, so it wouldn't be shown in a health API anyway.

Response codes starting with 5, usually 503, 500 or 504, mean a problem with the server. Trying again after a short delay (e.g. 5 seconds, increasing by 5 seconds for every subsequent error until the wait is 60 seconds) is appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants