Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Memory leak when accessing logs #310
We are using travis to retrieve all logs of all jobs of a project, like so:
repository.each_build do |build| jobs = build.jobs jobs.each do |job| log = job.log.body # do stuff. # give Ruby chance to gc log log = '' # GC.start end end
However, the call to job.log.body creates object(s) in the heap space that cannot be garbage collected, and therefore constantly increase the process's memory footprint (even when explicitly evoking GC.start in the loop). This is annoying for checking out the log files of smaller Travis projects, and a hindrance for checking out the 27,000+ builds of something like rails/rails, where this one Ruby process ended up eating > 20G of RAM.