Page MenuHomePhabricator

Investigation: Geoshapes are sometimes not loading
Closed, DuplicatePublic8 Estimated Story Points

Description

  • Why does this happen?
  • Can it be fixed? How expensive is the fix?
  • We might want to add logging to see how often it happens.

Examples
Geoshape not visible on static map, becomes visible in full screen

All geoshapes visible on static map, one of them disappears in full screen (toggling between full screen, escaping, then reopening sometimes gets it to load)

Event Timeline

Geoshape not visible on static map, becomes visible in full screen
Alaska

Alaska specifically is because it's shape crosses the 180/-180 boundary within the shape. The renderer doesn't handle that. Even in dynamic mode, you can see you only get half of the shape, the other half is on the far side of the map and the shapes are not wrapping/duplicated.

All geoshapes visible on static map, one of them disappears in full screen (toggling between full screen, escaping, then reopening sometimes gets it to load)

I've already investigated this once before, it is definitely error 429 rate limiting, because each included shape is requested by the map library as an individual url at once. Unknown which layer is doing the rate limiting exactly (maps api or wikidata api).

We can make the data loader consolidate requests into a single url (Like https://maps.wikimedia.org/geoshape?getgeojson=1&ids=Q12700,Q12709), or we could just load them sequentially with some additional time in between to avoid hitting cache rate limit (or both and bunch them in sequential groups of 10 or so?). Of note also is that the 429 error breaks the Origin causing CORS errors.

[Error] XMLHttpRequest cannot load https://maps.wikimedia.org/geoshape?getgeojson=1&ids=Q12779 due to access control checks.
[Error] Failed to load resource: Origin https://fr.wikipedia.org is not allowed by Access-Control-Allow-Origin. Status code: 429 (geoshape, line 0)

Screenshot 2022-05-12 at 14.24.50.png (338×697 px, 69 KB)

WMDE-Fisch set the point value for this task to 8.May 18 2022, 8:31 AM
awight subscribed.

Logstash shows many "groupIds not available" errors and requests lacking a revId. This should have become much less likely after versioned maps deployment, so we're also interested in exploring this aspect of the problem.

This work happened as part of T308638: Look into logstash for errors on maps, so I'll merge into that task.