[chef] Re: swap consuming bug in cookbook_file, chef-solo v10.26, SmartOS


Chronological Thread 
  • From: Ranjib Dey < >
  • To:
  • Subject: [chef] Re: swap consuming bug in cookbook_file, chef-solo v10.26, SmartOS
  • Date: Sun, 30 Jun 2013 09:46:31 -0700

Though this behavior is not expected , I'll suggest not to use chef as a file server to distribute large binaries or config files . use NFS or a vanilla lighthttpd server in to host the file and remotely_file resource inside the chef recipes to install it instead.
For getting the root cause you can use ruby-prof with kcachegrind to check which part of the close is actually consuming large memory

On Jun 30, 2013 6:21 AM, "Yonah Russ" < "> > wrote:
>
> Hi,
>
> I have a simple resource as follows:
>
> cookbook_file "/opt/local/share/da.json" do
>    source "da.json"
>     owner "root"
>     group "root"
>     mode "0644"
>     action :create_if_missing
>     notifies :reload, resources(:service => "apache")
> end
>
> The source file is 8MB.
> When chef needs to create this file, it suddenly consumes 750+MB of swap.
>
> Is this a known bug? Any recommendations on a workaround other than not using cookbook_file?
>
> Thanks,
> Yonah




Archive powered by MHonArc 2.6.16.

§