-
We use ImageMagick to create smaller previews of files. However, every now and then, our process fails due memory issues and the Kubernetes (Windows)POD we run our code on just shuts down. We reference Magick.NET-Q8-AnyCPU 13.3.0 and as far as I can see we run 64bit. When I limit the amount of memory by setting ImageMagick.ResourceLimits.Memory and ImageMagick.ResourceLimits.MaxMemoryRequest to about 2.5GB (and other higher and lower values) there is no positive effect. The following message is logged in the POD console: When I enable verbose logging, the last log lines of a failed run are: 2024-04-12T14:36:51+00:00 0:21.056 21.056u 7.1.1 Trace Tools.FileProcessor.exe[23368]: nt-base.c/NTResourceToBlob/1958/Trace locale.xml The logs show me that the 2.5GiB is applied on the Resource Memory. However, I also see 32GB on Resource Map and 63.999GB on Resource Area. Not sure what that means and if that is about to memory or disk space? Perhaps memory is not read from the POD but Node. Are there more handles that I can adjust to tweak the outcome? Again, by increasing to 8GB the file gets processed correctly. I am only trying to understand why it might fail because I do not know if 8GB is enough for the next file that might be a bit larger. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
The error message ImageMagick will only fallback to disk for pixels. The error message includes |
Beta Was this translation helpful? Give feedback.
-
Somewhat related #1744 |
Beta Was this translation helpful? Give feedback.
Setting
ResourceLimits.MaxProfileSize
seems to reduce the memory usage for this image. This option was added in the latest release. This should probably help with the memory issues that you have.