You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Poorna Murali <po...@gmail.com> on 2022/05/26 14:54:22 UTC

Regarding solr field cache

Hi,

I would like to know when will a solr field cache be invalidated or
cleared?

In our production configuration, we are doing a hard commit with
opensearcher = false and we do not have any soft commit in our config. We
can observe that fieldcache size is growing , at the same time it has not
become so huge.
Hence my guess is that the fieldcache is getting cleared sometimes,
otherwise we would have ran out of memory several times. But I am not sure
when the fieldcache is getting cleared.

Kindly help me on the same. Please let me know if I need to add further
details.

Thanks,
Poorna

Re: Regarding solr field cache

Posted by Walter Underwood <wu...@wunderwood.org>.
> On May 26, 2022, at 7:54 AM, Poorna Murali <po...@gmail.com> wrote:
> 
> Hence my guess is that the fieldcache is getting cleared sometimes,
> otherwise we would have ran out of memory several times. But I am not sure
> when the fieldcache is getting cleared.

If your field cache is large enough to cause an out of memory, then it is too big.
You have a configuration which can take down Solr. 

Reduce the size of the field cache to a safe size.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


Re: Regarding solr field cache

Posted by Shawn Heisey <ap...@elyograg.org>.
On 5/26/22 08:54, Poorna Murali wrote:
> I would like to know when will a solr field cache be invalidated or
> cleared?

Lucene will throw the existing fieldCache away whenever a new searcher 
is created.  A new searcher is created by autoSoftCommit, by explicit 
hard commits unless you disable it in the commit parameters, and by 
explicit soft commits.  Whether or not a new searcher is created by 
autoCommit is determined by the autoCommit config.  In the default out 
of the box configs, autoCommit does NOT create a new searcher.

Thanks,
Shawn