From 09badc697b2f92c4591e9a5e22d1f272b2cabd3f Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 4 Nov 2010 13:26:27 +0000 Subject: [PATCH] - low-memory patch for crawler git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7304 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/crawler/CrawlQueues.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/de/anomic/crawler/CrawlQueues.java b/source/de/anomic/crawler/CrawlQueues.java index 0450bd523..d0221ebe7 100644 --- a/source/de/anomic/crawler/CrawlQueues.java +++ b/source/de/anomic/crawler/CrawlQueues.java @@ -520,7 +520,12 @@ public class CrawlQueues { this.code = Integer.valueOf(entry.hashCode()); if (!workers.containsKey(code)) { workers.put(code, this); - this.start(); + try { + this.start(); + } catch (OutOfMemoryError e) { + Log.logWarning("CrawlQueues", "crawlWorker sequential fail-over: " + e.getMessage()); + this.run(); + } } this.setPriority(Thread.MIN_PRIORITY); // http requests from the crawler should not cause that other functions work worse }