I am using Apache Ignite as our caching mechanism for our java application. In a particular case, I have created a cache repository by extending Ignite's IgniteRepository class. This repository of mine has several methods with @Query annotation for getting data from the cache.
While running my application, I started getting an OutOfMemory exception, and my application stopped. I managed to get a heap dump for the same and analyzing it showed that ignite was occupying more than 2.5GB in the heap memory even though the collection cached is very small and hardly occupies a few MBs.
From the leak suspect report, it was visible that Ignite is holding too many maps in its cache. Following is a screenshot from the leak suspect report.
Upon further analysis, I also observed that this heap has been occupied in the form of Map instances inside org.apache.ignite.internal.processors.query.RunningQueryManager class.To be specific it has been held under the variable org.apache.ignite.internal.processors.query.RunningQueryManager.runs.
From my understanding, ignite removes elements from this map once the query has been executed and the data is returned. But from the facts and artefacts that I have, it is clear to me that this is not happening and Ignite is not removing the objects from this Map and keeps on retaining the heap memory.
Trying to figure out the solution for this issue.
Try the following:
See Techniques to Follow If Your Apache Ignite Cluster Is Running Out of Memory Space
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.