Maurizio In denmark
Maurizio In denmark

Reputation: 4284

Solr replication is slow

We have an old Solr 3.6 server and replication is behaving very strangely.

Look at the image. It is like super slow. It says that the connection is slow, but actually that may not be true because even after several minutes the number of kb downloaded does not change at all.

Also it is wrong that you see a total download of 419 GB, that is the whole index but we are not not copying all of it.

I can see the "downloading File" gets to 100% in a second and then the rest is all waiting time. Even when it goes faster, the wait time is always around 120sec before the index moves to the next version.

It stays in this state sometimes for a long time (like 5 to 20 minutes) and then suddenly it is all done. Sometimes it is quick instead.

We have a replication configuration like this:

<requestHandler name="/replication" class="solr.ReplicationHandler">
<lst name="master">
<str name="enable">${solr.master.enable:false}</str>
<str name="replicateAfter">startup</str>
<str name="replicateAfter">commit</str>
</lst>
<lst name="slave">
<str name="enable">${solr.slave.enable:false}</str>
<str name="masterUrl">http://10.20.16.125:8080/solr/replication</str>
<str name="pollInterval">00:00:60</str>

enter image description here

Upvotes: 1

Views: 1538

Answers (1)

AR1
AR1

Reputation: 5003

There are several possible causes that can lead to such issue:

  • java.lang.OutOfMemoryError happening during replication (in order to troubleshoot this kind of issue please refer to "How to deal with out of memory problems" in Apache Solr Cookbook);
  • A frequent segment merge that can be caused by:

As next step I advise to:

  1. Verify in the Solr server log the presence of OutOfMemory or other interesting errors.
  2. Verify how frequently the optimization is performed (do you have a trigger in your code?);
  3. Lower the merge factor to 2 (<mergeFactor>**2**</mergeFactor>)
  4. Try <useCompoundFile>true</useCompoundFile> that will tell Solr to use the compound index structure more and will thus reduce the number of files that create the index and the number of merges required.
  5. Verify if there's some merge policy bug opened for your Solr/Lucene version.

Some additional interesting info can be found in this answer.

Upvotes: 1

Related Questions