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

Memory leak when accessing logs #310

Open
Inventitech opened this issue Aug 9, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@Inventitech
Copy link

commented Aug 9, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.