-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
None
Over time the number of threads named "RMI TCP Connection(...)-..." on server grows infinitely.
I discovered that this is due garbage collection of Naming objects on client, which are cached in NamingContext.cachedServers map. The correspondent server objects with their threads remain on server waiting for distributed garbage collection, which happens rarely due to "-Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000" in run.conf.
I propose not use WeakReferences, instead to remove "expired" Naming objects from NamingContext.cachedServers periodically by some Timer, and also to explicitely remove correspondent remote RMI objects from server.