HomePhorge

(maint) Stop leaking file handles
1f01baf52c30Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(maint) Stop leaking file handles

File.new(f) results in a file handle being used. The test manifest in
this case ended up leaking file handles which caused the master to run
out of file handles while serving a request. This lead to a consistent
failure on the first thread requesting the catalog where the error
reported was:

Could not autoload puppet/type/notify: no such file to load -- /usr/lib/ruby/site_ruby/1.8/puppet/type/notify.rb

The error was misleading. The underlying problem was not an ENOENT, but
an EMFILE (Too many open files). By switching to File.read(f) the
manifest will no longer leak file handles.

Details

Provenance
Andrew Parker <andy@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU3e173a7009f8: (maint) Update file mode for future parser
Branches
Unknown
Tags
Unknown

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPU1f01baf52c30: (maint) Stop leaking file handles (authored by Andrew Parker <andy@puppetlabs.com>).Jun 3 2014, 12:41 AM