<#16697 Ideas for better handling of huge files in...
# github-notifications
c
#16697 Ideas for better handling of huge files in LMDB store Issue created by Eric-Arellano From user:
Hi. I’m trying to package a new app as a pex_binary and for the first time I’ve run into a problem that I can’t solve using just the docs. The app itself is in python, and has 32 dependencies, some of substantial size (e.g PyTorch). When I try to run pants package on the target, after around 10 minutes it crashes with “Failed to digest inputs”. I know this isn’t the most extensive description, but I’m not sure what and where I’d have to share for someone to help me
From @enough-analyst-54434
2GB certainly is a big input. You may need to adjust: https://www.pantsbuild.org/docs/reference-global#section-local-store-files-max-size-bytes Read that carefully though, there is another option to consider when coming up with a value to give you enough headroom to store a 2GB file.
Even if you get this working, the resulting PEX zip time and size will be huge. You may want to consider the packed layout for your PEX: https://www.pantsbuild.org/docs/reference-pex_binary#codelayoutcode It's a directory tree of zips instead of 1 zip, so less convenient to copy around, but may be the trick you need.
If this sort of thing turns out to be a common problem it may make sense to invest in 2 storage tiers for our local cache (LMDB for small to medium and read-only file blobs on disk for large) or else invent a new type for LMDB storage that transparently shards huge blobs into medium ones.
pantsbuild/pants