Search code examples
imagemagickminimagickmogrify

Minimagick error: libgomp: Thread creation failed: Resource temporarily unavailable


I am trying to do a bulk conversion of photos using MiniMagick / ImageMagick / mogrify and I keep on seeing:

libgomp: Thread creation failed: Resource temporarily unavailable

It processes the first 500 or so photos fine, and then seems to be stalled on photo #494 out of 3093.

Does anyone know why this happens?


Solution

  • I found using the posix-spawn gem fixed this for me as explained in the MiniMagick docs:

    MiniMagick.configure do |config|
      config.shell_api = "posix-spawn"
    end
    

    So I think this was memory related, but was reported with a cryptic error message.