I believe that MultiUserChatServerImpl contains a small memory leak if the MUC idle timeout is set to -1 (disabled).
It appears that the only time removeUser() is called is from the UserTimeoutTask, which is not run if that option is disabled. This means that over time if you are generating lots of new user accounts like we are, and have heavy usage of MUC, you will run out of memory since the ‘users’ map in MultiUserChatServerImpl will grow infinitely.
I was able to fix this by modifying the source code to make removeUser() public and calling it manually when a user goes offline, but this is obviously a poor solution. Maybe a better one would be to have the user cleanup task always run and remove users who are not in any rooms regardless of the value of the ‘xmpp.muc.tasks.user.timeout’ property.
Any thoughts on this?