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

Wikidata calls failing, likely due to proxy limitations / rate limits #10444

Open
mekarpeles opened this issue Feb 12, 2025 · 9 comments
Open
Labels
Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Priority: 2 Important, as time permits. [managed] Theme: Public APIs Issues related to APIs accessible to external parties. [managed] Type: Bug Something isn't working. [managed]

Comments

@mekarpeles
Copy link
Member

Problem

https://sentry.archive.org/organizations/ia-ux/issues/540536/?environment=production&p[…]kidata&referrer=issue-stream&statsPeriod=12h&stream_index=0

Image

Image

The first line works, attempts to connect to ipv4, the second one fails:

1739318415.282    197 207.241.234.180 TCP_TUNNEL/200 5131 CONNECT www.wikidata.org:443 - HIER_DIRECT/208.80.153.224 -
1739376095.816     13 207.241.234.180 NONE_NONE/503 0 CONNECT www.wikidata.org:443 - HIER_DIRECT/2620:0:860:ed1a::1 -

Hypothesis

The hypothesis is that, since we implemented proxy requests, we are no longer making requests from 3 servers (ol-web[0-2]) and instead just one. We need to explore a way to either cache more aggressively (for longer) or batch lookups in the same way that our bookworm affiliate-server does. Otherwise, the recommendation is we temporarily disable the calls to avoid making too many calls to wikidata.

We are hitting several thousand errors per 12h time period.

cc: @RayBB @cdrini

Reproducing the bug

  1. Go to ...
  2. Do ...
  • Expected behavior:
  • Actual behavior:

Context

  • Browser (Chrome, Safari, Firefox, etc):
  • OS (Windows, Mac, etc):
  • Logged in (Y/N):
  • Environment (prod, dev, local): prod

Breakdown

Requirements Checklist

  • [ ]

Related files

Stakeholders


Instructions for Contributors

  • Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
@mekarpeles mekarpeles added Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Priority: 2 Important, as time permits. [managed] Theme: Public APIs Issues related to APIs accessible to external parties. [managed] Type: Bug Something isn't working. [managed] labels Feb 12, 2025
@RayBB
Copy link
Collaborator

RayBB commented Feb 12, 2025

@mekarpeles How many total call are we making vs how many are failing?

@jimchamp
Copy link
Collaborator

Are any of these calls succeeding? I think that we need to update the endpoint:

@RayBB
Copy link
Collaborator

RayBB commented Feb 13, 2025

@jimchamp I think you're exactly right. As I understand this endpoint doesn't have a rate limit and if it did it should be giving a header to state such. So we should update the url.

@jimchamp
Copy link
Collaborator

We may also want to record non-200 _get_from_web() responses in Sentry somehow, in order to surface similar issues in the future.

@jimchamp
Copy link
Collaborator

I've opened #10452 to update the endpoint.

@jimchamp
Copy link
Collaborator

#10452 has been patch deployed, and I can see that entries are again being added to the wikidata table. As a follow-up, I'll make sure that all non-200 Wikidata requests are captured in Sentry.

@jimchamp
Copy link
Collaborator

#10456 adds Wikidata API errors to our Sentry logs.

I'm still seeing new ProxyError events in Sentry after patch-deploying yesterday, but much fewer of them:

Image
Errors over a seven-day period.

Image
20 errors today, so far (down from 15,900 yesterday)

@RayBB
Copy link
Collaborator

RayBB commented Feb 14, 2025

Add the 20 errors still 503s? Is it possible to get the IDs of the entities failing?

@jimchamp
Copy link
Collaborator

They're all the same: 503 ProxyErrors.

Looks like these errors from the past day have largely been triggered by bots:

Image

The IDs are included in the event title (pictured here). Do you want a small sample, or all of the events that occurred since the patch deployment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @mekarpeles Issues overseen by Mek (Staff: Program Lead) [managed] Needs: Breakdown This big issue needs a checklist or subissues to describe a breakdown of work. [managed] Priority: 2 Important, as time permits. [managed] Theme: Public APIs Issues related to APIs accessible to external parties. [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

No branches or pull requests

3 participants