Page MenuHomePhabricator

HTTP 500 error when generating 6000px wide thumbnail of a 6912px wide and 12.5MB JPEG file
Closed, DuplicatePublic

Details

Reference
bz36166

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 12:19 AM
bzimport set Reference to bz36166.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to comment #1)

XID: 1391948384

This XID value seems to change on page refresh, by the way.

bhartshorne wrote:

my guess is that it's failing to resize to a thumbnail that is 6565 pixels wide. It works for smaller images. fwiw, convert is failing with exit code 153.

(In reply to comment #3)

my guess is that it's failing to resize to a thumbnail that is 6565 pixels
wide. It works for smaller images.

Is it a Wikimedia or a MediaWiki issue then? (Still happening.)

sumanah wrote:

Still reproducible at

http://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Carbon_River_pano_01A.jpg/6565px-Carbon_River_pano_01A.jpg

When I change the width:

https://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/Carbon_River_pano_01A.jpg/72px-Carbon_River_pano_01A.jpg

then it's fine.

This may be related to bug 13493 ("Can't create thumbnail of images with a peculiar aspect ratio") and bug 20312 ("Error creating thumbnail: Image was not scaled, is the requested width bigger than the source?").

DIA.Keyser wrote:

I am getting a similar error when trying to download any size larger than 2048px for this van Gogh:

http://commons.wikimedia.org/wiki/File:Vincent_van_Gogh_-_De_slaapkamer_-_Google_Art_Project.jpg#file

(In reply to comment #6)

I am getting a similar error when trying to download van Gogh:

That's covered in bug 44071 instead.

I get "Error code: 137" nowadays.

earthsound wrote:

I have been seeing this error (as mentioned in comment 8, it's generating "Error code:137" now) for this particular image:

https://commons.wikimedia.org/wiki/File:Aerial_drawing,_1885,_of_Birmingham,_Alabama.jpg

The preview on that page (1280px width) is broken:

https://upload.wikimedia.org/wikipedia/commons/thumb/6/66/Aerial_drawing%2C_1885%2C_of_Birmingham%2C_Alabama.jpg/1280px-Aerial_drawing%2C_1885%2C_of_Birmingham%2C_Alabama.jpg

After a few failed attempts, it will generate this error: "Error generating thumbnail - There have been too many recent failed attempts (5 or more) to render this thumbnail. Please try again later."

I have found that any size thumbnail up to a width of 1234px will generate OK, but anything 1235px width or larger fails 100% of the time, even though the full resolution image is OK.

earthsound wrote:

I determined that I'd hit bug 17645, saved the file as a baseline optimized JPEG rather than progressive and now the thumbnails work. Sorry for the noise.

Perhaps the images reported in this bug are saved similarly (progressive)?

(In reply to earthsound from comment #10)

Perhaps the images reported in this bug are saved similarly (progressive)?

Ouch. We have lists of progressive images, attachment 11220 and attachment 11500, and you can easily test the cases above with exiftools or whatever. I think we've replaced by bot (most) of the bigger ones, but there may be other factors beyond size that make them fail: in that case, it would be nice to determine what they are, to fix them by bot.
It's also possible that whatever you did (a null "convert" run?) fixed *other* things.

Error code 137 = out of memory.

(In reply to Jasper Deng from comment #0)

http://upload.wikimedia.org/wikipedia/commons/thumb/f/f6/
Carbon_River_pano_01A.jpg/6565px-Carbon_River_pano_01A.jpg

Some sort of Guru meditation.

What's the use case for generating a 6000px wide thumbnail?

(In reply to earthsound from comment #10)

I determined that I'd hit bug 17645, saved the file as a baseline optimized
JPEG rather than progressive and now the thumbnails work. Sorry for the
noise.

Perhaps the images reported in this bug are saved similarly (progressive)?

Yep, that would do it. Progressive images are much more memory intensive to scale.


Note: the Carbon river file is a baseline jpeg.

Honestly I don't find it that surprising that it runs out of memory when you try to make a 66 megapixel thumbnail. I feel like this bug should be wontfixed unless people have a compelling reason to need such huge thumbnails.

https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Logiz_de_la_Lune_Rousse-Affiche1900.jpg/120px-Logiz_de_la_Lune_Rousse-Affiche1900.jpg

Error generating thumbnail

There have been too many recent failed attempts (4 or more) to render this thumbnail. Please try again later.
Aklapper renamed this task from OOM when generating 6000px wide thumb of large (baseline) jpeg to HTTP 500 error when generating 6000px wide thumbnail of a 6912px wide and 12.5MB JPEG file.Mar 29 2019, 5:37 PM
Aklapper edited projects, added Thumbor; removed WMF-General-or-Unknown.
Aklapper updated the task description. (Show Details)

This is same as T200313, closing as duplicate.