-
Type: Bug
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: 1.7.0, 1.8.0
-
Component/s: None
-
None
The Java native code here keeps a HashMap of Ruby runtimes in a static final variable: https://github.com/mongodb/mongo-ruby-driver/blob/ce6915fca98dabd264f6c15953a504c209c95132/ext/java/src/org/jbson/RubyBSONCallback.java#L42
This means entire Ruby runtimes will NEVER be GC'd. Many JRuby servers don't restart the entire server process, but rather create a new Ruby runtime during a redeployment; TorqueBox, for instance, can run multiple apps, so redeploying one doesn't necessitate the process itself restart.
The result of this can be pretty devastating for anyone trying to use MongoDB and JRuby. It's pretty easy to run out of memory when copies of your JRuby app are never up for garbage collection.
- is related to
-
RUBY-155 Performance of JRuby BSON could be improved by avoiding _runtime.getClassFromPath() calls
- Closed