-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file.managed memory usage with s3 sources #32916
Comments
@giannello, thanks for reporting. Can you post the specific error message you are getting? This may be similar to #31466 or #31506. |
@jfindlay I'm trying to reproduce the error on a vagrant box, but seems like the OOM killer kicks in before I can get the error from salt. Will need to reproduce the problem on my live systems. I'll try anyway to reproduce the issue and provide a proper stack trace. |
@giannello, the issues I referenced were similar problems of downloading files into memory before writing them to disk. I am wondering if we have not fixed all cases of this problem yet if you are seeing it on 2015.8.8.2. Any specific info you can give on how to reproduce or identify the problem would be great, even if you're not able to verify again. |
How to reproduceTested on a 512MB vagrant box with Ubuntu 14.04.
|
@giannello #33599 should fix this in develop. I'm hoping to get backport PRs submitted this week too, but if you could test out the develop fix, I would appreciate it. |
thanks @lomeroe - I'll test after coming back from holidays. |
@lomeroe, thanks for fixing this. |
@lomeroe, @giannello, @rallytime has backported this to 2015.8: #33681. |
Back-porting PRs have been submitted and merged. Closing. |
Description of Issue/Question
Trying to use file.managed to get a file from S3 fails if the file is too big for the amount of memory available in the minion.
The problem seems to be caused by this call https://github.com/saltstack/salt/blob/develop/salt/utils/s3.py#L128 where the request is initialized once and used in different ways depending on the method passed to
query
.A way to avoid the issue might be using streaming, as documented at http://docs.python-requests.org/en/latest/user/advanced/#body-content-workflow but that will require a bit of refactoring of the query method.
Versions Report
salt 2015.8.8.2 is definitely affected
The text was updated successfully, but these errors were encountered: