Hi,
Thanks for your reply. We're looking into the option of having a heap dump on OOM. However, we're running on cloudfoundry, without a volume service, so for now we're unable to create those on OOM. Even if they were created, the dump would be lost since the instance is killed with its internal storage.
We disabled the paging provider, but this on itself is not the reason for the OOM. HAPI seems to work fine even with queries of 100,000 diagnostic reports that are returned in a single query.
The strange thing is, the issue is not related to load. It sometimes happens when the instance had been idle for hours, so something else must be running even when the instance is idle.
Finally, we tried with 4GB instance and it got an OOM too. The 4GB instance had about 2.7GB of java heap space (the rest was allocated for code, native heap etc).
Shlomy