Re: Increasing memory leads to OOM error

2018-12-05 Thread Tony
I think the memory growth now is not related to Cayenne or Bootique. Tony Giaccone > On Dec 5, 2018, at 7:58 AM, Andrus Adamchik wrote: > > Invalidation goes all the way down from the context to the shared snapshot > cache. So maybe this is the shared cache to blame. It is only 10K snapshots

Re: Increasing memory leads to OOM error

2018-12-05 Thread Andrus Adamchik
Invalidation goes all the way down from the context to the shared snapshot cache. So maybe this is the shared cache to blame. It is only 10K snapshots max by default though, so not sure why would that be an issue (unless you increased it explicitly via 'cayenne.DataRowStore.snapshot.size' proper

Re: Increasing memory leads to OOM error

2018-12-05 Thread Tony Giaccone
In the end we invalidated all the objects we inserted and that solved the memory problem. The memory still climbs slightly but nothing like what was happening before the invalidation. There are other features that have PRs ready that are likely to cause the memory footprint to grow. But that’s

Re: Increasing memory leads to OOM error

2018-12-04 Thread Andrus Adamchik
While this wouldn't hurt, technically it should not be needed, as ObjectContext has weak references to "untouched" objects, so they will be GC'd sooner or later. I'd say the shared snapshot cache may be the culprit, but Tony says the following: >> Even thought after each insert we invalidate

Re: Increasing memory leads to OOM error

2018-12-04 Thread John Huss
I would try creating a new ObjectContext every so often, not just invalidating the objects. On Tue, Dec 4, 2018 at 2:58 PM Tony Giaccone wrote: > We're processing a request and generating about 130,000 new objects. Once > these objects are created and saved we'll never need to access them again

Increasing memory leads to OOM error

2018-12-04 Thread Tony Giaccone
We're processing a request and generating about 130,000 new objects. Once these objects are created and saved we'll never need to access them again in this process. The heap steadily grows as we do this. Even thought after each insert we invalidate the object we just inserted. What should I do to