Giter Club home page Giter Club logo

Comments (7)

amatsuda avatar amatsuda commented on May 18, 2024

Hi,

Thank you for your report.
I think I should fix that but I could not reproduce the leak.
I tested on MacOS 10.6, Ruby 1.8.7 & 1.9.2, Rails 3.0.4 and edge, Mongrel 1.2.0.pre2, Kaminari 0.9.9.

Can you please show me more info?
Does it happen on vanilla Rails app + Kaminari?

from kaminari.

Thibaut avatar Thibaut commented on May 18, 2024

Investigating further I found that what's happening is that all ActiveRecord::Base objects are kept in memory following each request. I have the same problem with this gem: https://github.com/soveran/ohm (though it doesn't happen unless I do something with an Ohm::Model, and then the AR objects start leaking).
I'm on the same setup as you so I guess this has something to do with my app, weird.

from kaminari.

troopbox avatar troopbox commented on May 18, 2024

I confirm this issue as well using Rails 3.0.1 + Thin 1.2.7 + Kaminari 0.10.1. Removing Kaminari from my Gemfile eliminates the rapid memory consumption.

from kaminari.

amatsuda avatar amatsuda commented on May 18, 2024

Thank you guys for reporting this issue.
Yes, this was really a weird problem, but finally fixed by just one single line of code! amatsuda@cb65a17

The root cause of this problem was that Kaminari had eliminated AR::Base.descendants, and thus Rails failed to reload the models.
I just released a gem including this commit, so could you please try out the version 0.10.4 gem?

Thanks!

from kaminari.

Thibaut avatar Thibaut commented on May 18, 2024

Yep, v0.10.4 fixed this issue for me. Thanks!

from kaminari.

troopbox avatar troopbox commented on May 18, 2024

Fixed for me as well! Thanks for creating this gem.

from kaminari.

amatsuda avatar amatsuda commented on May 18, 2024

@Thibaut @troopbox
Thank you for your quick response!
Closing this issue now.

from kaminari.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.