s3_object should flush data to disk during download to avoid filling up the host's ram #2395
Open
1 task done
Labels
feature
This issue/PR relates to a feature request
Summary
During object download, the
s3_object
module stores the entire file in memory before flushing data to disk.When operating with big files, this ends up occupying the host's entire RAM.
Though I can use workarounds, they all require me to not use this module, which I would prefer to use for standardization/consistency.
I feel the module should have an option to make the module flush to disk in small chucks.
It would be even better if the chunk's size could be defined in the module's arguments.
Issue Type
Bug Report
Component Name
s3_object
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Steps to Reproduce
Have an object in a S3 bucket bigger than the RAM of the executor
Download the object via the
s3_object
module:Look at the host crash
Expected Results
I expected the object to be downloaded in chunks, and those chucks to be concatenated in the resulting file as
curl
would do.I did not expect to have the whole object copied in memory.
Actual Results
The module runs, but the host stops responding when its memory is filled up completely.
Code of Conduct
The text was updated successfully, but these errors were encountered: