From c57026e24266912919fd0d053d8bb93cdb572441 Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Tue, 25 Feb 2014 15:23:45 +0100 Subject: [PATCH] recover from OOM --- .../solr/connector/ConcurrentUpdateSolrConnector.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java b/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java index feee3484e..ea97b893b 100644 --- a/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java +++ b/source/net/yacy/cora/federate/solr/connector/ConcurrentUpdateSolrConnector.java @@ -108,6 +108,14 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector { //ConcurrentLog.info("ConcurrentUpdateSolrConnector", "sending " + docs.size() + " documents to solr"); try { ConcurrentUpdateSolrConnector.this.connector.add(docs); + } catch (final OutOfMemoryError e) { + // clear and try again... + clearCaches(); + try { + ConcurrentUpdateSolrConnector.this.connector.add(docs); + } catch (final IOException ee) { + ConcurrentLog.logException(e); + } } catch (final IOException e) { ConcurrentLog.logException(e); }