We're using Apache Solr (3.1.0) to index a lot of articles written for multiple sites. We have a master/slave setup (replication config at the bottom), where server 1 indexes the articles, and server 2 replicates the index. The slave should poll the master every 60 seconds, but instead, we can see 10 to up to 75 consecutive /replication
calls nearly every time.
Each Solr core (${solr.core.name}
in the slave config)
represents a different site. The /replication
calls I see most are tied to the biggest site. One of the cores only got 1 call per minute, and I've been able to reproduce this there after calling update?commit=true
a few times, so this leads me to think it's related to the amount of commits the master performs.
So my question is, how do I stop the Solr slave from replicating the index dozens of times and force it to replicate just once per minute? I've tried playing with the commitReserveDuration
parameter in the master config, but I don't really see any difference.
master replication config:
<requestHandler name="/replication" class="solr.ReplicationHandler" >
<lst name="master">
<str name="replicateAfter">commit</str>
<str name="replicateAfter">startup</str>
</lst>
</requestHandler>
slave replication config:
<requestHandler name="/replication" class="solr.ReplicationHandler" >
<lst name="slave">
<str name="masterUrl">http://${solr.master.server}/search/${solr.core.name}/replication</str>
<str name="pollInterval">00:00:60</str>
</lst>
</requestHandler>