From b983e68254cff43d5a07cba4521c7c3da8de771d Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Mon, 4 Aug 2014 08:29:35 +0200 Subject: [PATCH] more retries, less sleep --- .../cora/federate/solr/connector/SolrServerConnector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/net/yacy/cora/federate/solr/connector/SolrServerConnector.java b/source/net/yacy/cora/federate/solr/connector/SolrServerConnector.java index 4b5092ebc..18b6eaa7b 100644 --- a/source/net/yacy/cora/federate/solr/connector/SolrServerConnector.java +++ b/source/net/yacy/cora/federate/solr/connector/SolrServerConnector.java @@ -296,7 +296,7 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen String threadname = Thread.currentThread().getName(); if (q != null) Thread.currentThread().setName("solr query: q = " + q + (fq == null ? "" : ", fq = " + fq)); QueryResponse rsp; - int retry = 10; + int retry = 100; Throwable error = null; while (retry-- > 0) { try { @@ -312,7 +312,7 @@ public abstract class SolrServerConnector extends AbstractSolrConnector implemen 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)); - try {Thread.sleep(1000);} catch (InterruptedException e) {} + try {Thread.sleep(100);} catch (InterruptedException e) {} } throw new IOException("Error executing query", error); }