In itself, the removal of a session is an unlikely cause of an OutOfMemory error. It could be a potential effect though.
In all cases I've seen this error, I'd been running a larger batch of something than the allocated memory could handle. If you're running in the Mx cloud; could you have a look at your memory graphs (sudden spikes or gradual increase) ?
Also, in an on-premise situation (and if no cause was obvious) I'd have the application do a heapdump when this happens, and analyse it to see exactly *what* is clogging up the memory. You might ask if Mx can provide such in the cloud as well.
Does it process a lot of records? What is the stacktrace?