Closed tallenaz closed 5 years ago
Adding the chances in-line to the gem would likely be the quickest fix.
To set a limit on the memory usage of ImageMagick: add to the beginning of the convert command:
-limit memory 2GiB -limit map 2GiB
These values can be tweaked as needed. This should force larger images to cache to disk.
The setting for ImageMagick can also be set globally through the /etc/ImageMagick-#/policy.xml
<policymap>
<policy domain="resource" name="memory" value="2048MiB"/>
<policy domain="resource" name="map" value="2048MiB"/>
</policymap>
To set a limit on the number of threads used by kakadu: add to the kdu_compress command:
-num_threads 2
This may resolve some jp2-create issues we've seen since the upgrade to imageMagick v7 on common-accessioning. This can be enforced through imageMagick's policy.xml file. We may want to set a 1GB memory limit.