Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

- low-memory patch for crawler

orbiter09badc697b2f
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
}