Error creating thumbnail: libgomp: Thread creation failed: Resource temporarily unavailable

Got the following error while loading thumbnail images in a wiki installation.

Error creating thumbnail: libgomp: Thread creation failed: Resource temporarily unavailable

The issue was with only a couple of images and others were working fine.

Fix:

The issue might be with the wgMaxShellMemory parameter in the media wiki configuration. Check the configuration file for this.

# vi includes/DefaultSettings.php

Increased the parameter value $wgMaxShellMemory and the images started loading fine.

If this doesn’t worked, you can also try increasing the shell execution (wgMaxShellFileSize) value in the above file.

Comments: 8

  1. olearn August 17, 2013 at 9:02 AM Reply

    very good. It works. thanks!
    By the way, never edit includes/DefaultSettings.php. You should edit /LocalSettings.php.

  2. cpanelstuffs August 17, 2013 at 11:38 PM Reply

    Hi Olearn,

    Thanks for the suggestion.

  3. Cholo September 16, 2013 at 7:56 PM Reply

    I had to increase the default value (100 Mb) to 400 Mb in order for it to work:

    # Fix thumnail generation error
    $wgMaxShellMemory = 409600;

  4. Fredrik October 25, 2013 at 3:21 PM Reply

    For anyone who’s interested, I also found decreasing the thread limit solved the problem, don’t know the equivalent in PHP, but the environment variable is MAGICK_THREAD_LIMIT, setting it to 2 solved it for me.

  5. cpanelstuffs October 27, 2013 at 12:53 AM Reply

    Hi Cholo,

    Great to hear that this fixed your issue.

  6. cpanelstuffs October 27, 2013 at 12:53 AM Reply

    Hi Fredrik,

    Thanks for the info.

  7. SplitiWire January 24, 2014 at 8:45 PM Reply

    This worked for me as well — thanks!

    • January 30, 2014 at 11:43 PM Reply

      Good to hear ;)

Leave a Reply

Your email address will not be published. Required fields are marked *