# Package Install Timeouts

**URL:** https://discourse.chef.io/t/package-install-timeouts/5162
**Category:** Chef Infra (archive)
**Created:** [March 25, 2014, 10:39pm UTC](https://discourse.chef.io/t/package-install-timeouts/5162 "2014-03-25T22:39:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Stewart\_Curtis](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/stewart_curtis/32/237_2.png) [@Stewart\_Curtis](https://discourse.chef.io/u/Stewart_Curtis)
#### Post date: [March 25, 2014, 10:39pm UTC](https://discourse.chef.io/t/package-install-timeouts/5162/1 "2014-03-25T22:39:10Z")

</div>

We’ve come across a couple package installations that result in timeout errors when installing with the package resource. (The specific packages are virtualbox and ruby1.9.3 on Ubuntu 12.04LTS).

Is there any way to work around this, or specify an increased timeout during specific package installations?

Thanks,  
Curtis

---

<div class="post-metadata">

### Author: ![jdunn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jdunn/32/1800_2.png) [@jdunn](https://discourse.chef.io/u/jdunn)
#### Post date: [March 26, 2014, 3:19am UTC](https://discourse.chef.io/t/package-install-timeouts/5162/2 "2014-03-26T03:19:24Z")

</div>

On Tue, Mar 25, 2014 at 6:39 PM, Stewart, Curtis  
[cstewart@momentumsi.com](mailto:cstewart@momentumsi.com) wrote:

> We've come across a couple package installations that result in timeout  
> errors when installing with the package resource. (The specific packages  
> are virtualbox and ruby1.9.3 on Ubuntu 12.04LTS).
> 
> Is there any way to work around this, or specify an increased timeout during  
> specific package installations?

Can you gist some output so we can see what exactly is timing out?

- Julian

--  
[Julian C. Dunn [jdunn@aquezada.com](mailto:jdunn@aquezada.com) \* Sorry, I'm ]  
[WWW: [http://www.aquezada.com/staff/julian](http://www.aquezada.com/staff/julian) \* only Web 1.0 ]  
[gopher://sdf.org/1/users/keymaker/ \* compliant!]  
[PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9]

---

<div class="post-metadata">

### Author: ![Kay\_Munch](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@Kay\_Munch](https://discourse.chef.io/u/Kay_Munch)
#### Post date: [March 26, 2014, 6:53am UTC](https://discourse.chef.io/t/package-install-timeouts/5162/3 "2014-03-26T06:53:13Z")

</div>

Hi Julian, Curtis,

May I still join the discussion, cause I think I'm struggling with the same  
problem the last days?  
Downloading the jdk1.8.0 using the 'java' cookbook, times out after 10  
minutes, which is approximately one minute too short, as the client.log tells  
me.  
An except of my client.log is attached to this mail.

Looking for a solution/workaround I may have found the source of my pain here:  
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-  
shellout-1.3.0/lib/mixlib/shellout.rb:29: DEFAULT\_READ\_TIMEOUT = 600

A couple of interesting lines are in the mentioned file:  
186 def timeout  
187 @timeout || DEFAULT\_READ\_TIMEOUT  
188 end  
but I'm not a ruby-expert and don't know how to deal with this knowledge, so I  
still (also?) like to ask how can I increase this timeout?

A workaround could be to change the DEFAULT\_READ\_TIMEOUT in my chef-client  
installation, but I'd like to avoid that and have yet not tried if this  
'solution' is working.

Thanks in advance and best regards.  
Kay

On Tue, Mar 25, 2014 at 11:19 PM, Julian C. Dunn wrote:

> On Tue, Mar 25, 2014 at 6:39 PM, Stewart, Curtis
> 
> [cstewart@momentumsi.com](mailto:cstewart@momentumsi.com) wrote:  
> ...  
> Can you gist some output so we can see what exactly is timing out?
> 
> - Julian

---

<div class="post-metadata">

### Author: ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)
#### Post date: [March 26, 2014, 3:36pm UTC](https://discourse.chef.io/t/package-install-timeouts/5162/4 "2014-03-26T15:36:33Z")

</div>

Looks like this cookbook is shelling out to curl to do the download, probably via an execute resource or direct call to the shellout method. In either case it should be possible to modify the timeout in the cookbook.

--  
Daniel DeLeo

On Tuesday, March 25, 2014 at 11:53 PM, Kay Münch wrote:

> Hi Julian, Curtis,
> 
> May I still join the discussion, cause I think I'm struggling with the same  
> problem the last days?  
> Downloading the jdk1.8.0 using the 'java' cookbook, times out after 10  
> minutes, which is approximately one minute too short, as the client.log tells  
> me.  
> An except of my client.log is attached to this mail.
> 
> Looking for a solution/workaround I may have found the source of my pain here:  
> /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-  
> shellout-1.3.0/lib/mixlib/shellout.rb:29: DEFAULT\_READ\_TIMEOUT = 600
> 
> A couple of interesting lines are in the mentioned file:  
> 186 def timeout  
> 187 @timeout || DEFAULT\_READ\_TIMEOUT  
> 188 end  
> but I'm not a ruby-expert and don't know how to deal with this knowledge, so I  
> still (also?) like to ask how can I increase this timeout?
> 
> A workaround could be to change the DEFAULT\_READ\_TIMEOUT in my chef-client  
> installation, but I'd like to avoid that and have yet not tried if this  
> 'solution' is working.
> 
> Thanks in advance and best regards.  
> Kay
> 
> On Tue, Mar 25, 2014 at 11:19 PM, Julian C. Dunn wrote:
> 
> > On Tue, Mar 25, 2014 at 6:39 PM, Stewart, Curtis
> > 
> > \<[cstewart@momentumsi.com](mailto:cstewart@momentumsi.com) ([mailto:cstewart@momentumsi.com](mailto:cstewart@momentumsi.com))\> wrote:  
> > ...  
> > Can you gist some output so we can see what exactly is timing out?
> > 
> > - Julian
> 
> Attachments:
> 
> - client.log

---

<div class="post-metadata">

### Author: ![Kay\_Munch](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@Kay\_Munch](https://discourse.chef.io/u/Kay_Munch)
#### Post date: [March 29, 2014, 4:50pm UTC](https://discourse.chef.io/t/package-install-timeouts/5162/5 "2014-03-29T16:50:02Z")

</div>

Hi Daniel,

thanks a lot for your suggestion. I came to a working solution by changing

---8\<---  
def download\_direct\_from\_oracle(tarball\_name, new\_resource)  
...  
cmd = shell\_out!(  
%Q[ curl --create-dirs -L --cookie  
"#{cookie}" #{new\_resource.url} -o #{download\_path} ]  
)  
---8\<---

into

---8\<---  
def download\_direct\_from\_oracle(tarball\_name, new\_resource)  
...  
cmd = shell\_out!(  
%Q[ curl --create-dirs -L --cookie  
"#{cookie}" #{new\_resource.url} -o #{download\_path} ], :timeout =\> 1200  
)  
---8\<---

within the provided ark.rb from the java cookbook.  
Many thanks again and best regards.  
Kay

On Wednesday, March 26, 2014 at 08:36 AM, Daniel DeLeo wrote:

> Looks like this cookbook is shelling out to curl to do the download,  
> probably via an execute resource or direct call to the shellout method. In  
> either case it should be possible to modify the timeout in the cookbook.
> 
> --  
> Daniel DeLeo
