Attempting to install Imagick inside of the WHM Module installer interface will fail with the below error.
thread.error: can't start new thread
[ERROR] Failed to ensure ImageMagick-devel RPM for imagick PECL
This issue can occur because cPanel restricts or limits the amount of memory a process can use. Since the process is limited, the operation required to install dependencies will fail.
Increasing the cPanel Max memory limit will solve this issue.
Note: This setting allows you to specify the maximum memory that a cPanel & WHM process can use before the system automatically kills it.
Related documentation: https://docs.cpanel.net/whm/server-configuration/tweak-settings/
1. Login to WHM
2. Navigate to Tweak Settings
3. Search for option "Max cPanel process memory"
4. Set this item to either Unlimited or double the current value configured on the server
5. Save the Tweak settings
6. Try installing the Imagick module once more in the Module Installers interface