History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JM-1312
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Daniel Henninger
Reporter: Guus der Kinderen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Openfire

MemoryLeak: Lots of LocalMUCUser instances that never get cleaned up.

Created: 03/27/08 08:56 AM   Updated: 03/27/08 02:09 PM
Component/s: Groupchat
Affects Version/s: None
Fix Version/s: 3.5.0

Time Tracking:
Not Specified

Support Plan Customer Issue: No
Resolution Date: 03/27/08 02:09 PM
Acceptance Test - Add?: No


 Description  « Hide
JM-1251 fixes a similar memory leak, but introduces a new one. The method checkForTimedOutUsers() in MultiUserChatServerImpl will never iterate over more than one value of the 'users' collection, if USER_IDLE equals -1. This is caused by the 'return' statement inside the if-loop.

Fix: change 'return' to 'continue'

Impact: without the fix, we had 78,886 instances of LocalMUCUsers, while we believed to have approximately 250 actual users in chatrooms. JProfiler reports around 160MB of 'exclusive deep size' (which should be an indication of the amount of memory that is eligable for garbage collection if the instances were to be removed).

Workaround: you can workaround by setting the property 'xmpp.muc.tasks.user.idle'. As MultiUSerChatServerImpl is NOT a PropertyChangeListener, you need to do this through the muc-tasks.jsp admin panel page, instead of setting a property manually (or restart Openfire after you set the property).

For other properties that are used in MultiUserChatServerImpl, a similar issue occurs. As some of these properties cannot be changed indirectly through an admin panel, changing these properties will require an Openfire restart. Perhaps the class should listen for property changes instead?



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Daniel Henninger - 03/27/08 10:47 AM
Hi Guus! In 3.6.0, a lot of things have changed with the MUC services in terms of you can now have multiple of them, and the properties are different. (they are not specific to a particular MUC service) Either way, excellent catch. I'll make sure the fix gets into 3.6.0. I'll talk with Gato as to whether we think this needs to get into 3.5.0.

Anyway, I restructured things just a tad to where a clustered property change will trigger a reload of the settings. "At present" there's no "service properties" for a MUC service. I suppose there could be, just haven't added that yet. If I did add that, should probably make MultiUserChatServiceImpl listen for said changes and reload it's config it if sees a change.