We're updating the issue view to help you get more done. 

PEP service memory leak

Description

As described by Andre:
Running Openfire service for a long time, with clients connecting and disconnecting, I realized that the memory was increasing up to the point the garbage collector could not do anything more to release memory (the CPU load was on top!).

I got a dump and analysed in JProfile and saw that the object EntityCapabilitiesManager.allUserCapabilitiesListeners was with about 7000 listeners. The instance of this listeners was PEPService.

Looking more deeply in code, I saw the PEPService are created/loadedFromDB and inserted in PEPServiceManager.pepServices cache. In the creation/loadFromDB the call pubSubEngine.start(pepService) inserts the PEPService in the EntityCapabilitiesManager.allUserCapabilitiesListeners.

However, the PEPService is evicted from cache every 30 minutes, but it still remains in EntityCapabilitiesManager. In the next call of PEPServiceManager.getPEPService() another instance of PEPService is inserted in EntityCapabilitiesManager.allUserCapabilitiesListeners for the same user.

Environment

None

Acceptance Test - Entry

None

Assignee

Guus der Kinderen

Reporter

Guus der Kinderen

Labels

None

Expected Effort

None

Components

Fix versions

Affects versions

Priority

Blocker
Configure