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

wikihow does not retry API requests #161

Open
benoit74 opened this issue Feb 23, 2024 · 3 comments
Open

wikihow does not retry API requests #161

benoit74 opened this issue Feb 23, 2024 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@benoit74
Copy link
Collaborator

wikihow_en_endless last task failed at the beginning while listing articles in each categories

The error returned is a 503, which is probably a transient error.

Task: https://farm.openzim.org/pipeline/bc83a4cb-341e-43f6-b1e4-e17b2324b5f0/debug)

Logs:

[MainThread::2024-02-22 22:07:34,231] DEBUG:-> article: Diagnose-Auditory-Processing-Disorder
[MainThread::2024-02-22 22:07:34,231] DEBUG:-> article: Cover-Your-Ear-in-the-Shower
[MainThread::2024-02-22 22:07:50,346] ERROR:Interrupting process due to error: Call failed: {"status_code": 503, "text_body": ""}
[MainThread::2024-02-22 22:07:50,346] ERROR:Call failed: {"status_code": 503, "text_body": ""}

We should probably retry API calls not only on ConnectionError (current pywikiapi behavior) but also on what looks like a transient error, or maybe all errors except 404 and few other maybe (because it may be too complex to identify what is a transient error with certainty).

We might also consider to add this retry logic to web scraping calls (they are not retried either).

@benoit74 benoit74 added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Feb 23, 2024
@rgaudin
Copy link
Member

rgaudin commented Feb 23, 2024

You might want to check https://github.com/openzim/wikihow/issues?q=is%3Aissue+503

@benoit74
Copy link
Collaborator Author

My bad, then only API requests are not retried I think. Thank you!

@benoit74 benoit74 changed the title wikihow does not retry web requests wikihow does not retry API requests Feb 23, 2024
@kelson42 kelson42 added this to the 1.3.0 milestone May 16, 2024
@benoit74
Copy link
Collaborator Author

This continue to impact MANY recipes (e.g. last runs of wikihow_ru_maxi, wikihow_pt_maxi, wikihow_nl_maxi)

Note that this issue might be made irrelevant (more or less) if we decide to switch from pywikiapi to another library as suggested in #162

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

No branches or pull requests

3 participants