I have a memory leak in my solr 3.6.2 based app that holds its index on NFS. I've read that it's not best practice to hold solr index on NFS, but I got this system by heritage and I can't change it at the moment.
Once in every X (configurable) minutes, the system "wakes up" and starts to index some data it collected during the sleeping time. It reads from files and the solr indexes it. The problem is that the memory of the solr app gets larger and larger every indexing cycle. Eventually it crashes with OOM, after several indexing cycles.
I took heapdump several times and tried to analyze it using Eclipse Memory Analyzer. The "Remainder" section is very large
and it seems that it consists of many org.apache.lucene.index.FreqProxTermsWriterPerField.FreqProxPostingsArray unreachable objects: dominator_tree
Is this the source of the leak or is this normal?
Another strange behavior is that more and more .nfs00000000000..... hidden files are being generated in the index directory (which is located on an NFS, as I noted before) with every indexing cycle.
These files take a lot of disk space, and they disappear when I kill the solr app. I suspect it has something to do with the leak. Does the app somehow holds those files and doesn't release them as long as it's alive? Is it the reason for the inevitable OOM error? How can I avoid having more and more of those files?
Thanks!