when I start my sketch it needs less than 5 GB of Ram and after one or two hours this increases up to more than 25 GB. I set the limit to 26 GB. The sketch is quite huge but there is no acculmulation of loading. How would you check what is the reason for this? How could this accumulation happen? Is there a suggest how to check for possible reasons?
Use something like VisualVM. Use the sampler tab to track what’s using up memory (you can filter by class / package - eg. processing). Once you see something suspicious, take a heap dump - on every object instance you can find its GC root that will tell you what’s stopping it from being garbage collected.
Also, try the Perform GC button in VisualVM and use the graphs to track when / how much garbage collection is going on.
If you set the limit to a bit over 5GB, what happens? Do you get an error for out of memory? If so, what’s the stack trace of it?