Here is cache in solrconfig.xml
<!-- Cache used by SolrIndexSearcher for filters (DocSets),
unordered sets of *all* documents that match a query.
When a new searcher is opened, its caches may be prepopulated
or "autowarmed" using data from caches in the old searcher.
autowarmCount is the number of items to prepopulate. For LRUCache,
the autowarmed items will be the most recently accessed items.
Parameters:
class - the SolrCache implementation (currently only LRUCache)
size - the maximum number of entries in the cache
initialSize - the initial capacity (number of entries) of
the cache. (seel java.util.HashMap)
autowarmCount - the number of entries to prepopulate from
and old cache.
-->
<filterCache
class="solr.LRUCache"
size="512"
initialSize="512"
autowarmCount="256"/>
<!-- queryResultCache caches results of searches - ordered lists of
document ids (DocList) based on a query, a sort, and the range
of documents requested. -->
<queryResultCache
class="solr.LRUCache"
size="512"
initialSize="512"
autowarmCount="256"/>
<!-- documentCache caches Lucene Document objects (the stored fields for each
document).
Since Lucene internal document ids are transient, this cache will not be
autowarmed. -->
<documentCache
class="solr.LRUCache"
size="512"
initialSize="512"
autowarmCount="0"/>
<!-- If true, stored fields that are not requested will be loaded lazily.
This can result in a significant speed improvement if the usual case is to
not load all stored fields, especially if the skipped fields are large
compressed
text fields.
-->
<enableLazyFieldLoading>true</enableLazyFieldLoading>
<!-- Example of a generic cache. These caches may be accessed by name
through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
The purpose is to enable easy caching of user/application level data.
The regenerator argument should be specified as an implementation
of solr.search.CacheRegenerator if autowarming is desired. -->
<!--
<cache name="myUserCache"
class="solr.LRUCache"
size="4096"
initialSize="1024"
autowarmCount="1024"
regenerator="org.mycompany.mypackage.MyRegenerator"
/>
-->
<!-- An optimization that attempts to use a filter to satisfy a search.
If the requested sort does not include score, then the filterCache
will be checked for a filter matching the query. If found, the filter
will be used as the source of document ids, and then the sort will be
applied to that.
<useFilterForSortedQuery>true</useFilterForSortedQuery>
-->
<!-- An optimization for use with the queryResultCache. When a search
is requested, a superset of the requested number of document ids
are collected. For example, if a search for a particular query
requests matching documents 10 through 19, and queryWindowSize is 50,
then documents 0 through 50 will be collected and cached. Any further
requests in that range can be satisfied via the cache. -->
<queryResultWindowSize>10</queryResultWindowSize>
<!-- This entry enables an int hash representation for filters (DocSets)
when the number of items in the set is less than maxSize. For smaller
sets, this representation is more memory efficient, more efficient to
iterate over, and faster to take intersections. -->
<HashDocSet maxSize="3000" loadFactor="0.75"/>
<!-- boolToFilterOptimizer converts boolean clauses with zero boost
into cached filters if the number of docs selected by the clause
exceeds
the threshold (represented as a fraction of the total index) -->
<boolTofilterOptimizer enabled="true" cacheSize="32" threshold=".05"/>
<!-- a newSearcher event is fired whenever a new searcher is being prepared
and there is a current searcher handling requests (aka registered). -->
<!-- QuerySenderListener takes an array of NamedList and executes a
local query request for each NamedList in sequence. -->
<!--
<listener event="newSearcher" class="solr.QuerySenderListener">
r...@solrslave06 conf]# cat solrconfig.xml | grep -i cache
<!-- Cache used by SolrIndexSearcher for filters (DocSets),
When a new searcher is opened, its caches may be prepopulated
or "autowarmed" using data from caches in the old searcher.
autowarmCount is the number of items to prepopulate. For LRUCache,
class - the SolrCache implementation (currently only LRUCache)
size - the maximum number of entries in the cache
the cache. (seel java.util.HashMap)
and old cache.
<filterCache
class="solr.LRUCache"
<!-- queryResultCache caches results of searches - ordered lists of
<queryResultCache
class="solr.LRUCache"
<!-- documentCache caches Lucene Document objects (the stored fields for each
document).
Since Lucene internal document ids are transient, this cache will not be
autowarmed. -->
<documentCache
class="solr.LRUCache"
<!-- Example of a generic cache. These caches may be accessed by name
through SolrIndexSearcher.getCache(),cacheLookup(), and cacheInsert().
of solr.search.CacheRegenerator if autowarming is desired. -->
<cache name="myUserCache"
class="solr.LRUCache"
If the requested sort does not include score, then the filterCache
<!-- An optimization for use with the queryResultCache. When a search
then documents 0 through 50 will be collected and cached. Any further
requests in that range can be satisfied via the cache. -->
into cached filters if the number of docs selected by the clause
exceeds
<boolTofilterOptimizer enabled="true" cacheSize="32" threshold=".05"/>
1-2 for read-only slaves, higher for masters w/o cache warming. -->
every xsltCacheLifetimeSeconds.
<int name="xsltCacheLifetimeSeconds">5</int>
And here is in schema.xml
Sort artist name used by mp3 store to sort artist title for search
-->
<field name="sortArtistName" type="text" indexed="true" stored="true"/>
<field name="availableOnAlbum" type="boolean" indexed="true" stored="true"/>
<field name="sku" type="textTight" indexed="true" stored="true"
omitNorms="true"/>
<field name="text" type="text" indexed="true" stored="false"
multiValued="true"/>
<field name="trackSort" type="string" indexed="true" stored="false"/>
<field name="alphaTrackSort" type="alphaOnlySort" indexed="true"
stored="true"/>
<field name="albumSort" type="string" indexed="true" stored="false"/>
<field name="alphaAlbumSort" type="alphaOnlySort" indexed="true"
stored="false"/>
<field name="artistSort" type="string" indexed="true" stored="false"/>
<field name="alphaArtistSort" type="alphaOnlySort" indexed="true"
stored="false"/>
<field name="genreSort" type="string" indexed="true" stored="false"/>
<field name="genreArtistSort" type="alphaOnlySort" indexed="true"
stored="false"/>
<!-- Here, default is used to create a "timestamp" field indicating
When each document was indexed.
-->
<field name="timestamp" type="date" indexed="true" stored="true"
default="NOW" multiValued="false"/>
<fieldType name="string" class="solr.StrField" sortMissingLast="true"
omitNorms="true"/>
<!-- boolean type: "true" or "false" -->
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"
omitNorms="true"/>
<!-- The optional sortMissingLast and sortMissingFirst attributes are
currently supported on types that are sorted internally as strings.
- If sortMissingLast="true", then a sort on this field will cause
documents
without the field to come after documents with the field,
regardless of the requested sort order (asc or desc).
- If sortMissingFirst="true", then a sort on this field will cause
documents
without the field to come before documents with the field,
regardless of the requested sort order.
- If sortMissingLast="false" and sortMissingFirst="false" (the default),
then default lucene sorting will be used which places docs without the
field first in an ascending sort and last in a descending sort.
-->
<!-- numeric field types that store and index the text
value verbatim (and hence don't support range queries, since the
lexicographic ordering isn't equal to the numeric ordering) -->
<fieldType name="integer" class="solr.IntField" omitNorms="true"/>
<fieldType name="long" class="solr.LongField" omitNorms="true"/>
<fieldType name="float" class="solr.FloatField" omitNorms="true"/>
<fieldType name="double" class="solr.DoubleField" omitNorms="true"/>
!-- Numeric field types that manipulate the value into
a string value that isn't human-readable in its internal form,
but with a lexicographic ordering the same as the numeric ordering,
so that range queries work correctly. -->
<fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true"
omitNorms="true"/>
<fieldType name="slong" class="solr.SortableLongField"
sortMissingLast="true" omitNorms="true"/>
<fieldType name="sfloat" class="solr.SortableFloatField"
sortMissingLast="true" omitNorms="true"/>
<fieldType name="sdouble" class="solr.SortableDoubleField"
sortMissingLast="true" omitNorms="true"/>
<!-- A text field that uses WordDelimiterFilter to enable splitting and
matching of
words on case-change, alpha numeric boundaries, and non-alphanumeric
chars,
so that a query of "wifi" or "wi fi" could match a document containing
"Wi-Fi".
Synonyms and stopwords are customized by external files, and stemming
is enabled.
Duplicate tokens at the same position (which may result from Stemmed
Synonyms or
WordDelim parts) are removed.
-->
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt"
ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1"
generateNumberParts="1" catenateWords="0" catenateNumbers="0" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
-----Original Message-----
From: Otis Gospodnetic [mailto:[email protected]]
Sent: Tuesday, May 05, 2009 10:32 AM
To: [email protected]
Subject: Re: OutOfMemory error
Hi Francis,
How big are your caches? Please paste the relevant part of the config.
Which of your fields do you sort by? Paste definitions of those fields from
schema.xml, too.
Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
----- Original Message ----
> From: Francis Yakin <[email protected]>
> To: "[email protected]" <[email protected]>
> Sent: Tuesday, May 5, 2009 1:00:07 PM
> Subject: OutOfMemory error
>
>
> I am having frequent OutOfMemory error on our slaves server.
>
> SEVERE: Error during auto-warming of
> key:org.apache.solr.search.queryresult...@aca6b9cb:java.lang.OutOfMemoryError:
> allocLargeObjectOrArray - Object size: 34279632, Num elements: 8569904
> SEVERE: Error during auto-warming of
> key:org.apache.solr.search.queryresult...@f9947c35:java.lang.OutOfMemoryError:
> allocLargeObjectOrArray - Object size: 34431488, Num elements: 8607868
> SEVERE: Error during auto-warming of
> key:org.apache.solr.search.queryresult...@d938cfa3:java.lang.OutOfMemoryError:
> allocLargeObjectOrArray - Object size: 34431488, Num elements: 8607868
> Exception in thread "[ACTIVE] ExecuteThread: '2' for queue:
> 'weblogic.kernel.Default (self-tuning)'" java.lang.OutOfMemoryError:
> allocLargeObjectOrArray - Object size: 8208, Num elements: 8192
> Exception in thread "[ACTIVE] ExecuteThread: '5' for queue:
> 'weblogic.kernel.Default (self-tuning)'" java.lang.OutOfMemoryError:
> allocLargeObjectOrArray - Object size: 8208, Num elements: 8192
> Exception in thread "[ACTIVE] ExecuteThread: '8' for queue:
> 'weblogic.kernel.Default (self-tuning)'" java.lang.OutOfMemoryError:
> allocLargeObjectOrArray - Object size: 8208, Num elements: 8192
> Exception in thread "[STANDBY] ExecuteThread: '3' for queue:
> 'weblogic.kernel.Default (self-tuning)'" java.lang.OutOfMemoryError:
> allocLargeObjectOrArray - Object size: 8208, Num elements: 8192
> Exception in thread "[ACTIVE] ExecuteThread: '13' for queue:
> 'weblogic.kernel.Default (self-tuning)'" java.lang.OutOfMemoryError:
> allocLargeObjectOrArray - Object size: 8208, Num elements: 8192
>
>
> We are running weblogic and java version is 1.5.
>
> We set the heap size to 1.5GB?
>
> What's the recommendation for this issue?
>
> Thanks
>
> Francis