Skip to content
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

Out of memory while downloading large files #55

Closed
pall-valmundsson opened this issue May 9, 2015 · 10 comments
Closed

Out of memory while downloading large files #55

pall-valmundsson opened this issue May 9, 2015 · 10 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@pall-valmundsson
Copy link

While trying to download a large .zip file (1.3GB) in a test VM with 512MB of RAM the only output I got from the puppet run was Killed. I increased the VM RAM incrementally and got Error: Could not run: failed to allocate memory until I had increased the RAM to 2GB, i.e. the file could be stored in RAM as a whole until flushed to disk.

Is this a known unfixable issue? Or an issue with the provider implementation? Or is there some workaround that can be applied?

@nibalizer
Copy link
Member

Are you pulling the file over http or ftp?

@pall-valmundsson
Copy link
Author

Ah, sorry I left that out. This is a HTTP Basic Auth pull.

@nibalizer
Copy link
Member

Looking a bit at the code, this looks like an issue in the faraday library. However I dont see an issue on the faraday bug tracker for it. I'll try to find some time to bang on it today.

@pall-valmundsson
Copy link
Author

Thanks for looking into this. Other potentially important information.
Puppet 3.7.5
CentOS 6
and therefore Ruby 1.8.7

@nibalizer
Copy link
Member

I am able to reproduce the problem at least.

@nanliu
Copy link
Contributor

nanliu commented May 13, 2015

In this case might as well swap out faraday with net/http and eliminate a dependency. I'll take a crack at it over next few days.

@nanliu nanliu added this to the 0.4.0 milestone May 13, 2015
@nanliu nanliu self-assigned this May 13, 2015
@nanliu nanliu added the enhancement New feature or request label May 13, 2015
@nibalizer
Copy link
Member

@nanliu do you think its in faraday? Is the typical pattern in puppet to hold in ram before file flushing? I'm just not experienced enough to know.

@nanliu
Copy link
Contributor

nanliu commented May 13, 2015

I thought this was one of things I verified early on, but clearly missed it when evaluating faraday. Per their roadmap: https://github.com/lostisland/faraday/wiki/Roadmap and open PR: lostisland/faraday#156, I don't think we are able to do streaming with faraday. net/http will require some code to handle http errorcodes and redirect, but will support streaming.

This was referenced May 22, 2015
@jyaworski
Copy link
Member

Since it looks like the Faraday PR is stalled, should we move to net/http or similar?

@nanliu
Copy link
Contributor

nanliu commented Nov 25, 2015

Yes, we should switch to net/http as default provider.

nanliu added a commit to nanliu/puppet-archive that referenced this issue Feb 25, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
nanliu added a commit to nanliu/puppet-archive that referenced this issue Feb 25, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
nanliu added a commit to nanliu/puppet-archive that referenced this issue Feb 25, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
nanliu added a commit to nanliu/puppet-archive that referenced this issue Feb 25, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
nanliu added a commit to nanliu/puppet-archive that referenced this issue Feb 25, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
nanliu added a commit to nanliu/puppet-archive that referenced this issue Mar 3, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
nanliu added a commit to nanliu/puppet-archive that referenced this issue Mar 4, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
nanliu added a commit to nanliu/puppet-archive that referenced this issue Mar 4, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
* make ruby default provider for windows.
* migrate functions away from faraday.
* change target release to 0.5.0
nanliu added a commit to nanliu/puppet-archive that referenced this issue Mar 4, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
* make ruby default provider for windows.
* migrate functions away from faraday.
* change target release to 0.5.0
nanliu added a commit to nanliu/puppet-archive that referenced this issue Mar 4, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
* make ruby default provider for windows.
* migrate functions away from faraday.
* change target release to 0.5.0
nanliu added a commit to nanliu/puppet-archive that referenced this issue Mar 4, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
* make ruby default provider for windows.
* migrate functions away from faraday.
* change target release to 0.5.0
nanliu added a commit to nanliu/puppet-archive that referenced this issue Mar 4, 2016
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
* make ruby default provider for windows.
* migrate functions away from faraday.
* change target release to 0.5.0
jyaworski added a commit that referenced this issue Mar 7, 2016
GH-55 use net::http to stream files
cegeka-jenkins pushed a commit to cegeka/puppet-archive that referenced this issue Oct 23, 2017
* Fix voxpupuliGH-55 large file memory issue.
* Remove puppet agent dependency on Faraday gem.
* make ruby default provider for windows.
* migrate functions away from faraday.
* change target release to 0.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants