The code (4.x) suggests that an autoCommit of 0 or negative or not present in the config disables autoCommit, but time and document count-based commit are independent:

protected UpdateHandlerInfo loadUpdatehandlerInfo() {
 return new UpdateHandlerInfo(get("updateHandler/@class",null),
         getInt("updateHandler/autoCommit/maxDocs",-1),
         getInt("updateHandler/autoCommit/maxTime",-1),
         getBool("updateHandler/autoCommit/openSearcher",true),
         getInt("updateHandler/commitIntervalLowerBound",-1),
         getInt("updateHandler/autoSoftCommit/maxDocs",-1),
         getInt("updateHandler/autoSoftCommit/maxTime",-1));
}
...
private void _scheduleCommitWithinIfNeeded(long commitWithin) {
 long ctime = (commitWithin > 0) ? commitWithin : timeUpperBound;

 if (ctime > 0) {
   _scheduleCommitWithin(ctime);
 }
}

private void _scheduleCommitWithin(long commitMaxTime) {
 if (commitMaxTime <= 0) return;
...
public void addedDocument(int commitWithin) {
// maxDocs-triggered autoCommit. Use == instead of > so we only trigger once on the way up
 if (docsUpperBound > 0) {
...
public String toString() {
 if (timeUpperBound > 0 || docsUpperBound > 0) {
return (timeUpperBound > 0 ? ("if uncommited for " + timeUpperBound + "ms; ")
       : "")
+ (docsUpperBound > 0 ? ("if " + docsUpperBound + " uncommited docs ")
           : "");

 } else {
   return "disabled";
 }
}
(Same code is used for autoSoftCommit as well.)
...
public NamedList getStatistics() {
 NamedList lst = new SimpleOrderedMap();
 lst.add("commits", commitCommands.get());
 if (commitTracker.getDocsUpperBound() > 0) {
   lst.add("autocommit maxDocs", commitTracker.getDocsUpperBound());
 }
 if (commitTracker.getTimeUpperBound() > 0) {
lst.add("autocommit maxTime", "" + commitTracker.getTimeUpperBound() + "ms");
 }
 lst.add("autocommits", commitTracker.getCommitCount());
 if (softCommitTracker.getDocsUpperBound() > 0) {
lst.add("soft autocommit maxDocs", softCommitTracker.getDocsUpperBound());
 }
 if (softCommitTracker.getTimeUpperBound() > 0) {
lst.add("soft autocommit maxTime", "" + softCommitTracker.getTimeUpperBound() + "ms");
 }
...

But, I would note that there is no formal JavaDoc contract for this behavior, so it is not guaranteed and could be changed in the future.

-- Jack Krupansky

-----Original Message----- From: Otis Gospodnetic
Sent: Saturday, December 29, 2012 12:34 AM
To: solr-user@lucene.apache.org
Subject: Re: Frequent OOM - (Unknown source in logs).

Hi,

I'm not sure what that autoCommit with 0 values does.  Does it effectively
disable autocommits?  I hope so, else this may be a problem.

How large are your Solr caches?
What sort of fields do you filter and facet on?
How big is your index in terms of # of docs?

Otis
--
Solr & ElasticSearch Support
http://sematext.com/




On Fri, Dec 28, 2012 at 12:50 PM, shreejay <shreej...@gmail.com> wrote:

Hi Otis,

Following is the setup:

6 Solr individual servers (VMs) running on Jetty.
3 Shards. Each shard with a leader and replica.
*Solr Version *: /Solr 4.0 (with a patch from Solr-2592)./
*OS*: /CentOS release 5.8 (Final)/
*Java*:
/java version "1.6.0_32"
Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
Java HotSpot(TM) 64-Bit Server VM (build 20.7-b02, mixed mode) /

*Memory*: /4 servers have 32 GB, 2 have 30 GB. /
*Disk space*: /500 GB on each server. /

*Queries*:
Usual select queries with upto 6 filters.
facets on around 8 fields. (returning only top 20) .

*Java options while starting the server:*
/JAVA_OPTIONS="-Xms15360m -Xmx15360m -DSTOP.PORT=1234 -DSTOP.KEY=XXXX
-XX:NewRatio=1 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC
-XX:+CMSParallelRemarkEnabled -XX:+UseCompressedOops
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/ABC/LOGFOLDER
-XX:-TraceClassUnloading
-Dbootstrap_confdir=./solr/collection123/conf
-Dcollection.configName=123conf
-DzkHost=ZooKeeper001:1111,ZooKeeper002:1111,SGAZZooKeeper003:1111
-DnumShards=3 -jar start.jar"
LOG_FILE="/ABC/LOGFOLDER/solrlogfile.log"
/

I run a *commit* using a curl command every 30 mins using a cron job.
/curl --silent

http://11.111.111.111:1234/solr/collection123/update/?commit=true&openSearcher=false/

In my SolrConfig file I have these *Commit settings*:
/updateHandler class="solr.DirectUpdateHandler2">

        <autoCommit>
        <maxDocs>0</maxDocs>
        <maxTime>0</maxTime>
        </autoCommit>
    <autoSoftCommit>
         <maxTime>0</maxTime>
    </autoSoftCommit>

    <openSearcher>false</openSearcher>
    <waitSearcher>false</waitSearcher>

    <updateLog>
      <str name="dir">${solr.data.dir:}</str>
    </updateLog>

  </updateHandler>

/


Please let me know if you would like more information. I am Not indexing
any
documents right now and I again got a OOM around an hour back one one of
the
nodes. Lets call it Node1. The node is in "recovery" right now. and keeps
erroring with this message:
/SEVERE: Error while trying to
recover:org.apache.solr.common.SolrException:
Server at
http://NODE2:8983/solr/collection1 returned non ok status:500,
message:Server Error
/
Although its still showing as "recovering" it is serving queries according
to the log file.
The other instance in this shard became the leader and is up and running
properly (serving queries).




--
View this message in context:
http://lucene.472066.n3.nabble.com/Frequent-OOM-Unknown-source-in-logs-tp4029361p4029459.html
Sent from the Solr - User mailing list archive at Nabble.com.


Reply via email to