KNOWNHOST KNOWLEDGE BASE

Hosting Question? Find the Solution - Browse our Guides, Articles, and How-To's

Libgomp thread creation error and how to fix it

This article applies to servers running Apache with CloudLinux.

While running any website such as WordPress that takes advantage of server applications such as ‘ImageMagick’ you may occasionally have an environment where you’ll receive an error upon uploading images.

As such, when you attempt to upload an image you’ll be met with the following error message:

  libgomp: Thread creation failed: Resource temporarily unavailable

  --OR--

  Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploading a smaller image may help

These particular errors are a result of environment setups regarding ImageMagick and its processing on the server that your website is hosted on. Any software application that uses ImageMagick, especially WordPress can experience this error when there is a limited number of resources that the account utilizes in comparison to the overall server.

For example, websites hosted in CloudLinux environments can be especially sure to experience this error due to limitations imposed by CloudLinux to ensure ample resources for the rest of the server.

How to resolve Libgomp errors

The libgomp error can be corrected by specifying a .htaccess rule within your .htaccess file. This rule will specific set the limit for your website to utilize a specific thread count for when processing/utilizing ImageMagick.

For how to access .htaccess for editing, you can see: Accessing .htaccess

The following rule would need to be set within the .htaccess file for the affected website:

  SetEnv MAGICK_THREAD_LIMIT 1

Once set, your application/software should be able to upload and/or utilize ImageMagick as necessary for image-related requirements.

Ex: WordPress should no longer generate any errors when uploading/processing images.

Conclusion

Have a WordPress website? Check out our Managed VPS Hosting or Managed WordPress Hosting and see if we are a good fit for you. KnownHost offers 365 days a year, 24 hours a day, all 7 days of the week best in class technical support. A dedicated team ready to help you should you need our assistance. You’re not using KnownHost for the best webhosting experience? Well, why not?