Mediawiki uses ImageMagick Utility for resized thumbnail image. You can use it as

$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";

in your LocalSettings.php.

There are two reasons why ImageMagick is beneficial.

  1. It reduces loading time for image file as it stores thumbnail image separately.
  2. It gives higher quality than GD library.

However, you may encounter following error when shell memory is not allocated big enough.

Error creating thumbnail:
libgomp: Thread creation failed: Cannot allocate memory

It is due to small shell memory allocation which is handled by Mediawiki. In this case, you can simply add following in LocalSettings.php

$wgMaxShellMemory = 524288;

524288 means 512K. You can specify it as you desire. 1

  7 Responses to “Thumbnail Image Memory Allocation Error in Mediawiki”

  1. Resolution of "Memory Allocation Error" when Mediawiki uses ImageMagick. http://bit.ly/5LSspB

  2. I just encountered this problem on my wiki site. Thanks for posting this information – your solution worked perfectly for me.

  3. excellent tip!

  4. and thank you!

  5. Thanks, after months of hacking around and googleing my ass of you finally gave a good reason for the error and a working solution!

  6. Thanks for posting this, searching the Mediawiki manual was no help. Worked perfectly!

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

 

December 2009
S M T W T F S
« Nov   Feb »
 12345
6789101112
13141516171819
20212223242526
2728293031  

Follow Me

© 2011 Bread & Cup Suffusion theme by Sayontan Sinha