Manual talk:$wgMaxShellMemory

Error creating thumbnail: Invalid thumbnail parameters

 * Discussion out in the wild from 2009
 * MediaWiki bug from 2012
 * MediaWiki code fix, 2013

SVG
The default value of $wgMaxShellMemory in MW1.19.2 is too low for SVG thumbnail rendering.

The Error message produced by a value too low is far too obtuse: Error creating thumbnail: ERROR: meta.c (179): wmf_header_read: this isn't a wmf file convert: Delegate failed `"wmf2svg" -o "%o" "%i"'. convert: unable to open image `/tmp/magick-XXn4EQJ3': No such file or directory. convert: unable to load module `/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/svg.la': libdbus-1.so.3: failed to map segment from shared object: Cannot allocate memory. convert: unable to open file `/tmp/magick-XXn4EQJ3': No such file or directory. convert: missing an image filename `PNG:/tmp/transform_402f06e-1.png'.

Setting $wgMaxShellMemory to 300000 FIXED IT. (Thanks folks on Mediawiki-l for the tip! I would never have thought of this!)

Caution: This is LINUX only! Won't work with POSIX like systems e.g. FreeBSD
Hi everyone,

the function wfShellExec checks OS for "Linux" before using "ulimit4.sh", so for example FreeBSD won't use any ulimit here. This will fail sooner or later.

Someone[tm] should[tm] create a patch for ulimit4.sh and wfShellExec to enable ulimits for any POSIX aware operating system having a /bin/sh. Bug report will follow. --Rabe (talk) 10:06, 26 April 2013 (UTC)


 * I patched this for my system and verified it by getting a memory allocation error now:

Fehler beim Erstellen des Vorschaubildes: convert: memory allocation failed `/data/www/wiki.*****.org/secure/images/1/1b/FreeBSD_System_verschluesseln_mit_geli(8)_Diagramm.svg' @ error/svg.c/ReadSVGImage/2968. convert: no images defined `PNG:/data/www/wiki.*****.org/secure/images/temp/transform_28149c237e88-1.png' @ error/convert.c/ConvertImageCommand/3078.
 * The Community should check my patches (especially on Linux), see Bug 47781.
 * Regards --Rabe (talk) 22:24, 26 April 2013 (UTC)
 * BugReport, please review and comment! --Rabe (talk) 19:37, 27 April 2013 (UTC)