Page MenuHomePhabricator

Missing original for video 500s instead of 404ing
Closed, ResolvedPublic

Description

Looking at the last 100 HTTP 500s on thumbor1001, I see that this video fails to render and appears to be fine on Mediawiki:

https://upload.wikimedia.org/wikipedia/commons/thumb/1/1c/Accidents_will_happen_William-H.-Watson-Universal-Star-Featurette-1922-EYE_FLM1205-OB_687097-720x404.ogv.webm/200px--Accidents_will_happen_William-H.-Watson-Universal-Star-Featurette-1922-EYE_FLM1205-OB_687097-720x404.ogv.webm.jpg (127.0.0.1) 289.57ms

Maybe it has something to do with the double file extension?

Event Timeline

Oct 17 07:20:53 thumbor1001 thumbor@8830[127650]: http://ms-fe.svc.eqiad.wmnet/v1/AUTH_mw/wikipedia-commons-local-public.1c/1/1c/Accidents_will_happen_William-H.-Watson-Universal-Star-Featurette-1922-EYE_FLM1205-OB_687097-720x404.ogv.webm: Server returned 404 Not Found
Oct 17 07:20:53 thumbor1001 thumbor@8830[127650]: 2016-10-17 07:20:53,371 8830 thumbor:ERROR ERROR: Traceback (most recent call last):
Oct 17 07:20:53 thumbor1001 thumbor@8830[127650]: File "/usr/lib/python2.7/dist-packages/thumbor/handlers/__init__.py", line 126, in get_image
Oct 17 07:20:53 thumbor1001 thumbor@8830[127650]: elif result.engine_error == EngineResult.COULD_NOT_LOAD_IMAGE:
Oct 17 07:20:53 thumbor1001 thumbor@8830[127650]: AttributeError: 'FetchResult' object has no attribute 'engine_error'
Oct 17 07:20:53 thumbor1001 thumbor@8830[127650]: 2016-10-17 07:20:53,371 8830 thumbor:ERROR [BaseHandler] get_image failed for url `http%3A//ms-fe.svc.eqiad.wmnet/v1/AUTH_mw/wikipedia-commons-local-public.1c/1/1c/Accidents_will_happen_William-H.-Watson-Universal-Star-Featurette-1922-EYE_FLM1205-OB_687097-720x404.ogv.webm`. error: `'FetchResult' object has no attribute 'engine_error'`
Oct 17 07:20:53 thumbor1001 thumbor@8830[127650]: 2016-10-17 07:20:53,372 8830 tornado.access:ERROR 500 GET /wikipedia/commons/thumb/1/1c/Accidents_will_happen_William-H.-Watson-Universal-Star-Featurette-1922-EYE_FLM1205-OB_687097-720x404.ogv.webm/200px--Accidents_will_happen_William-H.-Watson-Universal-Star-Featurette-1922-EYE_FLM1205-OB_687097-720x404.ogv.webm.jpg (127.0.0.1) 289.57ms

OK, so this makes sense, the file moved. It used to be https://commons.wikimedia.org/wiki/File:Accidents_will_happen_William-H.-Watson-Universal-Star-Featurette-1922.ogv.webm and it's now https://commons.wikimedia.org/wiki/File:Accidents_will_happen_William-H.-Watson-Universal-Star-Featurette-1922.webm

This thumbnail request asks for the file in the old location. And Swift rightfully doesn't find it.

It seems like Mediawiki is able to still correct for the redirect on thumbnail requests, even when asking for new sizes. This is without a doubt because Mediawiki can look at the file history and determine that it's a redirect and ask Swift for the original in its new location. This isn't something Thumbor will be able to do, as Thumbor shouldn't be aware of the file history.

In Thumbor's context, though, this should be a 404 and not a 500.

Gilles renamed this task from Investigate failing video to Missing original for video 500s instead of 404ing.Oct 17 2016, 8:02 AM

Change 316305 had a related patch set uploaded (by Gilles):
Upgrade to 0.1.28

https://gerrit.wikimedia.org/r/316305

Change 316305 merged by Filippo Giunchedi:
Upgrade to 0.1.28

https://gerrit.wikimedia.org/r/316305