Memory leak very quickly after few hours

Hello,
Openfire memory set up to 40GB but after a few hours the memory becomes full. We have made a heap dump. All memory occupied by LocalRoutingTable and ssSessionContext


Which version of Openfire and JVM version is being used?

Hello,
The JVM is : 1.8.0_222 Private Build – OpenJDK 64-Bit Server VM
Openfire version : 4.4.4

hi,can you explain:
How many concurrent users are connected?
How much time did it take?

It is about 2000 concurrent users and after about 10 hours the memory becomes full.