You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Large TIFF input can generate "Cumulated memory allocation" errors, unlimited flag is ignored #4446
** (process:47088): WARNING **: 10:54:13.498: tiff2vips: Cumulated memory allocation of 11580342 + 22930420 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 34464756 bytes each)
tiff2vips: Cumulated memory allocation of 11580342 + 22930420 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 34464756 bytes each)
tiffload: no property named `tiffSubifd'
Error handling file chunk: tiff2vips: Cumulated memory allocation of 11580342 + 22930420 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 34464756 bytes each)
tiff2vips: Cumulated memory allocation of 11580342 + 22930420 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 34464756 bytes each)
tiff2vips: Cumulated memory allocation of 11580342 + 22930420 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 34464756 bytes each)
tiff2vips: Cumulated memory allocation of 11580342 + 22930420 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Cumulated memory allocation of 11580342 + 22930420 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 34464756 bytes each)
tiff2vips: Cumulated memory allocation of 11580342 + 22930420 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 34464756 bytes each)
tiff2vips: Cumulated memory allocation of 11580342 + 22930420 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 34464756 bytes each)
However, I’m still getting the same error when processing some very large files (some are several GBs in size).
Could you please confirm if limitInputPixels: false completely disables the pixel limit, or if there’s still an upper bound internally? And is there a recommended way to process extremely large images with sharp, or should I consider tiling/streaming them instead?
Error converting image: tiff2vips: Cumulated memory allocation of 11562892 + 9984432 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 21518768 bytes each)
tiff2vips: Cumulated memory allocation of 11562892 + 9984432 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 21518768 bytes each)
tiff2vips: Cumulated memory allocation of 11562892 + 9984432 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 21518768 bytes each)
tiff2vips: Cumulated memory allocation of 11562892 + 9984432 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 21518768 bytes each)
tiff2vips: Cumulated memory allocation of 11562892 + 9984432 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 21518768 bytes each)
tiff2vips: Cumulated memory allocation of 11562892 + 9984432 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 21518768 bytes each)
tiff2vips: Cumulated memory allocation of 11562892 + 9984432 bytes is beyond the 20971520 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for TIFFReadDirEntryArray (1 elements of 21518768 bytes each)
at webpImageConverter (file:///var/task/index.js:80:13)
at async handler (file:///var/task/index.js:53:32)
As a test, I downgraded to [[email protected]]
, and it works fine there. So it seems this problem only occurs in newer versions.
Could you confirm if there’s been a change to how limitInputPixels: false is handled in recent releases, or if there’s another recommended way to process extremely large images?
As a test, I downgraded to [[email protected]] , and it works fine there. So it seems this problem only occurs in newer versions.
Could you confirm if there’s been a change to how limitInputPixels: false is handled in recent releases, or if there’s another recommended way to process extremely large images?
Thanks again!
Thanks!! Downgrading the version solved my issue as well. I'm only using the unlimited option, so I guess there's an issue with that option at least in 0.34.3
changed the title [-]Cumulated memory allocation[/-][+]Large TIFF input can generate "Cumulated memory allocation" errors, unlimited flag is ignored[/+]on Aug 29, 2025
tested showing some warnings but its working fine for me thank you
** (process:19692): WARNING **: 10:19:53.961: tiff2vips: Cumulated memory allocation of 51854204 + 51808152 bytes is beyond the 52428800 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for custom tag binary object (51808152 elements of 1 bytes each)
tiff2vips: Cumulated memory allocation of 51854204 + 51808152 bytes is beyond the 52428800 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for custom tag binary object (51808152 elements of 1 bytes each)
tiffload: no property named `tiffSubifd'
** (process:19692): WARNING **: 10:19:55.180: tiffload_buffer: no property named `tiffSubifd'
** (process:19692): WARNING **: 10:19:55.412: tiff2vips: Cumulated memory allocation of 51854204 + 51808152 bytes is beyond the 52428800 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for custom tag binary object (51808152 elements of 1 bytes each)
tiff2vips: Cumulated memory allocation of 51854204 + 51808152 bytes is beyond the 52428800 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for custom tag binary object (51808152 elements of 1 bytes each)
tiffload: no property named `tiffSubifd'
Activity
lovell commentedon Aug 28, 2025
Hi, did you see the
unlimitedconstructor option?https://sharp.pixelplumbing.com/api-constructor/
If you still require help, please provide a sample image that allows someone else to reproduce.
Pb0001818 commentedon Aug 29, 2025
Hi, thanks for your reply.
I’m already using the constructor options:
const originalImage = sharp(combinedFilePath, {
limitInputPixels: false,
failOnError: false,
unlimited: true
})
However, I’m still getting the same error when processing some very large files (some are several GBs in size).
Could you please confirm if limitInputPixels: false completely disables the pixel limit, or if there’s still an upper bound internally? And is there a recommended way to process extremely large images with sharp, or should I consider tiling/streaming them instead?
Thanks for your help!
lovell commentedon Aug 29, 2025
If you still require help, please provide a sample image that allows someone else to reproduce.
Pb0001818 commentedon Aug 29, 2025
(https://www.transfernow.net/dl/20250829p4gKJqQy/RzkYXRXC) here is file and please tell if is there possible to get layer info from tiff file...?
Torchu commentedon Aug 29, 2025
I'm getting the same error.
I'm calling Sharp like this:
EDIT: My file is 38.2 MB
Pb0001818 commentedon Aug 29, 2025
As a test, I downgraded to [[email protected]]
, and it works fine there. So it seems this problem only occurs in newer versions.
Could you confirm if there’s been a change to how limitInputPixels: false is handled in recent releases, or if there’s another recommended way to process extremely large images?
Thanks again!
Torchu commentedon Aug 29, 2025
Thanks!! Downgrading the version solved my issue as well. I'm only using the
unlimitedoption, so I guess there's an issue with that option at least in 0.34.3lovell commentedon Aug 29, 2025
This is likely to relate to the upstream problem being discussed at libvips/libvips#4649
[-]Cumulated memory allocation[/-][+]Large TIFF input can generate "Cumulated memory allocation" errors, unlimited flag is ignored[/+]Ensure unlimited flag is passed to tiffload #4446
lovell commentedon Sep 15, 2025
A release candidate is now available with the fix if you're able to test:
Pb0001818 commentedon Sep 16, 2025
npm install [email protected]
tested showing some warnings but its working fine for me thank you
** (process:19692): WARNING **: 10:19:53.961: tiff2vips: Cumulated memory allocation of 51854204 + 51808152 bytes is beyond the 52428800 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for custom tag binary object (51808152 elements of 1 bytes each)
tiff2vips: Cumulated memory allocation of 51854204 + 51808152 bytes is beyond the 52428800 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for custom tag binary object (51808152 elements of 1 bytes each)
tiffload: no property named `tiffSubifd'
** (process:19692): WARNING **: 10:19:55.180: tiffload_buffer: no property named `tiffSubifd'
** (process:19692): WARNING **: 10:19:55.412: tiff2vips: Cumulated memory allocation of 51854204 + 51808152 bytes is beyond the 52428800 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for custom tag binary object (51808152 elements of 1 bytes each)
tiff2vips: Cumulated memory allocation of 51854204 + 51808152 bytes is beyond the 52428800 cumulated byte limit defined in open options
tiff2vips: Failed to allocate memory for custom tag binary object (51808152 elements of 1 bytes each)
tiffload: no property named `tiffSubifd'
lovell commentedon Sep 16, 2025
Thanks for reporting this, it looks like there was a regression in 0.34.3, which I've fixed via commit 35d3f56
lovell commentedon Sep 17, 2025
v0.34.4 now available.
chore(deps): update dependency sharp to ^0.35.5 (#9)