Page MenuHomePhabricator

Excessive memory usage by new ImageMagick when scaling JPEGs
Closed, ResolvedPublic

Description

http://commons.wikimedia.org/wiki/File:Midsummer_Night%27s_Dream_Henry_Fuseli2.jpg

This won't thumbnail if you put your preferences to 1200px wide. It will thumbnail at lower resolutions than that.


Version: unspecified
Severity: blocker

Details

Reference
bz24824

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:11 PM
bzimport set Reference to bz24824.
bzimport added a subscriber: Unknown Object (MLST).

overlordq wrote:

I just checked my preferences page and thumbnail sizes only goes up to 300px. I have no clue where you're getting 1200 from.

(In reply to comment #1)

I just checked my preferences page and thumbnail sizes only goes up to 300px. I
have no clue where you're getting 1200 from.

Sorry, I wasn't entirely clear:
The relevant preference is "Image Size Limit", which is what it's called on the Preference page. The file description page uses the thumbnailer to generate the image seen based on that preference, meaning that the maximum size the thumbnailer can handle needs to be over 1280x1024, the highest option available there.

At a rough guess, someone (fairly recently, since we have lots of working ones) set the thumbnailer to have a max size of one megapixel, forgetting it's used on file description pages too.

1.5 or, if some extra leeway is desired, 2 megapixels should be ample to cover all cases.

based on timing, perhaps related to Bug 19960 's fix.

As an interesting note, http://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Midsummer_Night%27s_Dream_Henry_Fuseli2.jpg/2528px-Midsummer_Night%27s_Dream_Henry_Fuseli2.jpg 2528px and higher seems work, and 2228px ( http://upload.wikimedia.org/wikipedia/commons/thumb/d/d7/Midsummer_Night%27s_Dream_Henry_Fuseli2.jpg/2228px-Midsummer_Night%27s_Dream_Henry_Fuseli2.jpg ) gives a different error message:

"Error creating thumbnail: convert: Output file write error --- out of disk space? `/mnt/thumbs/wikipedia/commons/thumb/d/d7/Midsummer_Night's_Dream_Henry_Fuseli2.jpg/2228px-Midsummer_Night's_Dream_Henry_Fuseli2.jpg' @ error/jpeg.c/EmitMessage/235."

(compared to the 1200px one which gives no error).

(In reply to comment #6)

Has the sharpening of JPEGs gotten turned off? New thumbnails look VERY soft,
e.g.
http://upload.wikimedia.org/wikipedia/commons/thumb/3/37/Benjamin_West_-_William_Woollett_-_The_Battle_at_La_Hogue.jpg/400px-Benjamin_West_-_William_Woollett_-_The_Battle_at_La_Hogue.jpg
which is nearly unusable.

That has no relation to this bug report, Please open a new one to address this, instead of just hopping between different bug reports.

I've created a new bug for the sharpness issue, bug 24857.

test5555 wrote:

"thumbnails of large images have disappeared" (bug 24834) seems related

kbroszko wrote:

(In reply to comment #2)

(In reply to comment #1)

I just checked my preferences page and thumbnail sizes only goes up to 300px. I

The same in my case above 300px the image disapears. "Nicene oxyrpapiry.jpg"

v85.wikipedia wrote:

(In reply to comment #10)

Djvu file don't run too now.

As Wikisource relies on displaying the separate pages of DjVu files for proofreading of texts, Wikisource would seem particularly affected by this error.

Fixed with live patch: using -resize before -thumbnail reduces memory usage by half.

Reverted that live patch and applied r71547 instead, which is even better at reducing memory usage for JPEGs. Adjusted summary so that I can dupe bug 24834 to this, since it appears to be identical.

  • Bug 24834 has been marked as a duplicate of this bug. ***