Page MenuHomePhabricator

Large image https://commons.wikimedia.org/wiki/File:Map_of_Hindoostan,_1788,_by_Rennell.jpg can't create thumbs
Closed, ResolvedPublic

Description

[23:46]  <    yannf>	https://commons.wikimedia.org/wiki/File:Map_of_Hindoostan,_1788,_by_Rennell.jpg can't create thumbs?
[23:46]  <    yannf>	(big file)
[23:49]  <    yannf>	Error creating thumbnail: An unknown error occurred. for all thumbs

Nothing obvious in thumbnail.log related to the file, but that log tends to lack context for the image being processed. @Reedy notes that the image is very large and may exceed the current $wgMaxImageArea setting.

Event Timeline

bd808 created this task.Oct 13 2016, 12:11 AM
Restricted Application added subscribers: Matanya, Aklapper. · View Herald TranscriptOct 13 2016, 12:11 AM

Logstash logs say:
Removing bad 0-byte thumbnail "/tmp/transform_aa824f9b05cb.jpg". unlink() succeeded

[00:04]  <   Revent>	^ yannf’s error, mentioned above… the image is 183 megapixels, ‘well’ above $wgMaxImageArea
Aklapper renamed this task from https://commons.wikimedia.org/wiki/File:Map_of_Hindoostan,_1788,_by_Rennell.jpg can't create thumbs to Large image https://commons.wikimedia.org/wiki/File:Map_of_Hindoostan,_1788,_by_Rennell.jpg can't create thumbs.Oct 13 2016, 7:33 AM
Aklapper triaged this task as Low priority.
Revent added a subscriber: Revent.Oct 13 2016, 7:52 PM

If this is simply a result of configuration, should this be changed to ask for a config change, or marked invalid if such a change is not desired?

Yann added a comment.Nov 16 2016, 10:00 PM

There are not that many big files. Would it be possible to enable thumbnails?

MarkTraceur moved this task from Untriaged to Triaged on the Multimedia board.Nov 28 2016, 5:38 PM
MarkTraceur added a project: Performance.

@Yann if that's desired, I think consensus would be needed from the Commons community, and we'd need a precise number to set for the new upper limit. I think it would be important to prevent vulnerabilities that may be opened from suddenly thumbnailing a large number of huge files, all at once. We'd need any config change to be reviewed by, at least, the Performance team.

(sorry guys, I know you're busy, but this seems like a fairly obvious one to tag you in)

I wonder why files like this one of mine (841 megapixels) affected. Both are in JPEG format.

Colin added a subscriber: Colin.Nov 29 2016, 11:28 AM

File:Royal Albert Hall - Central View Square.jpg is bigger both in megapixels (238.61 Megapixel) and filesize (84.29 MB) and thumbnails fine. Indeed the File Description page for that contains links to smaller versions such as 33% which use the thumbnailer. The thumbnailer will refuse to generate a 50% thumb as this is too large.

So I don't think the problem is or should be the size of the source JPG but the size of the generated thumb.

I did a $ convert Map_of_Hindoostan,_1788,_by_Rennell.jpg Map_of_Hindoostan,_1788,_by_Rennell.converted.jpg, reuploaded the recompressed file and now the thumb generation seems fine. Either something is wrong with the file itself or the imagescalers.

One of the suggested solutions was to increase $maxImageArea, and if that solution won't help, then we need someone to investigate further.

Aklapper closed this task as Resolved.Nov 16 2017, 1:13 AM

The 66 MB file at https://commons.wikimedia.org/wiki/File:Map_of_Hindoostan,_1788,_by_Rennell.jpg renders thumbnails correctly for me.
Hence closing this task as this problem cannot be reproduced anymore nowadays.
Please reopen and provide links if you can still reproduce this very problem. Thanks!