Is it possible to log what Mendix garbage collection is deleting?
Hi there! I’m currently investigating a bug with our app, where a small list of NPE data (3 objects) is lost, if the user goes back and forth between two pages too many times. I have a hunch it might be the mendix garbage collection treating them as unused and deleting them. Is there a way to view in the logs, or anywhere else, what Mendix is clearing out as part of this process to be sure? I’ve seen documentation/forum comments explaining that linking NPEs to the session is a recommended workaround for garbage collection, which seems to fix the issue i’m seeing so that makes me more confident it is this, but I’d still like to be 100% if possible. Cheers Luke
No, for Mendix developers this is not possible. But, if you are right, then it is also not your problem to solve since garbage collection is the task of the MBS, Mendix Business Server, which is maintained by Mendix. Best thing to do therefore is creating an application in which you can reproduce this behaviour (or copy your current project, strip it from things not related to this problem) and create a support ticket.
Tim v Steenbergen
I had seen a similar behaviour in one of the apps, and I verified it, although it was in a different version of Mendix. I don't recall if it was just browser back or closing the page and I'm not sure if you're closing the page or not though.
It seems that Mendix garbage collection also runs when you close pages (too many times). See their official documentation: