Skip to content

ocrd_exif: use -ping to avoid decoding pixels if possible - #1371

Draft
kba wants to merge 1 commit into
masterfrom
magick-no-ping
Draft

kba wants to merge 1 commit into
masterfrom
magick-no-ping

Conversation

@kba

@kba kba commented Oct 16, 2026

Copy link
Copy Markdown
Member

This was the reason for some ephemeral-storage failures I had in k8s: For very large images, with the (default) +ping, the whole file needs to be read and for large files the cache magick uses won't fit into memory and will be dumped to $TMPDIR which I need to avoid.

Draft because I don't yet understand all the ramifications. For now I keep +ping but set MAGICK_DISK_LIMIT=0 to avoid disk writes from magick altogether and observe any problematic behavior.

This was the reason for some ephemeral-storage failures I had in k8s:
For very large images, with the (default) `+ping`, the whole file needs
to be read and for large files the cache magick uses won't fit into
memory and will be dumped to $TMPDIR which I need to avoid.

Draft because I don't yet understand all the ramifications. For now I
keep `+ping` but set `MAGICK_DISK_LIMIT=0` to avoid disk writes from
magick altogether.
@kba

kba commented Oct 16, 2026

Copy link
Copy Markdown
Member Author

Lots of

15:20:00.317 ERROR ocrd.exif - [PHYS_0002] identify exited with non-zero 1: identify-im6.q16: cache resources exhausted

now but no failures so far.

@bertsky

bertsky commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Please help me understand this:

Are you saying that the /tmp dumping behaviour (which you don't want) is controlled by MAGICK_DISK_LIMIT, and that you can already avoid the failures b setting that to zero?

And that using -ping (but no MAGICK_DISK_LIMIT) achieves the same effect?

I cannot seem to find documentation on either these variables or how they relate to the /etc/ImageMagick/policy.xml settings...

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants