more retries, less sleep

pull/1/head
Michael Peter Christen 10 years ago
parent 1503ba7794
commit b983e68254

@ -296,7 +296,7 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen
String threadname = Thread.currentThread().getName(); String threadname = Thread.currentThread().getName();
if (q != null) Thread.currentThread().setName("solr query: q = " + q + (fq == null ? "" : ", fq = " + fq)); if (q != null) Thread.currentThread().setName("solr query: q = " + q + (fq == null ? "" : ", fq = " + fq));
QueryResponse rsp; QueryResponse rsp;
int retry = 10; int retry = 100;
Throwable error = null; Throwable error = null;
while (retry-- > 0) { while (retry-- > 0) {
try { try {
@ -312,7 +312,7 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen
clearCaches(); // prevent further OOM if this was caused by OOM clearCaches(); // prevent further OOM if this was caused by OOM
} }
ConcurrentLog.severe("SolrServerConnector", "Failed to query remote Solr: " + error.getMessage() + ", query:" + q + (fq == null ? "" : ", fq = " + fq)); ConcurrentLog.severe("SolrServerConnector", "Failed to query remote Solr: " + error.getMessage() + ", query:" + q + (fq == null ? "" : ", fq = " + fq));
try {Thread.sleep(1000);} catch (InterruptedException e) {} try {Thread.sleep(100);} catch (InterruptedException e) {}
} }
throw new IOException("Error executing query", error); throw new IOException("Error executing query", error);
} }

Loading…
Cancel
Save