Skip to content

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

spend CrawlQueues a fremem routine - clears errorStack - will not get hit often (but better little than nothing on low mem)

reger28eae57e8be3
diff --git a/source/net/yacy/crawler/data/CrawlQueues.java b/source/net/yacy/crawler/data/CrawlQueues.java
index 1f2e59c16..369ee0626 100644
--- a/source/net/yacy/crawler/data/CrawlQueues.java
+++ b/source/net/yacy/crawler/data/CrawlQueues.java
@@ -186,6 +186,15 @@ public class CrawlQueues {
}
}
+ public void freemem() {
+ if ((this.errorURL.stackSize() > 1)) {
+ log.warn("freemem: Cleaning Error-URLs report stack, "
+ + this.errorURL.stackSize()
+ + " entries on stack");
+ this.errorURL.clearStack();
+ }
+ }
+
public Request[] activeWorkerEntries() {
synchronized (this.workers) {
final Request[] e = new Request[this.workers.size()];
diff --git a/source/net/yacy/search/SwitchboardConstants.java b/source/net/yacy/search/SwitchboardConstants.java
index 031470014..bb4fe9ded 100644
--- a/source/net/yacy/search/SwitchboardConstants.java
+++ b/source/net/yacy/search/SwitchboardConstants.java
@@ -95,7 +95,7 @@ public final class SwitchboardConstants {
public static final String CRAWLJOB_LOCAL_CRAWL = "50_localcrawl";
public static final String CRAWLJOB_LOCAL_CRAWL_METHOD_START = "coreCrawlJob";
public static final String CRAWLJOB_LOCAL_CRAWL_METHOD_JOBCOUNT = "coreCrawlJobSize";
- public static final String CRAWLJOB_LOCAL_CRAWL_METHOD_FREEMEM = null;
+ public static final String CRAWLJOB_LOCAL_CRAWL_METHOD_FREEMEM = "freemem";
public static final String CRAWLJOB_LOCAL_CRAWL_IDLESLEEP = "50_localcrawl_idlesleep";
public static final String CRAWLJOB_LOCAL_CRAWL_BUSYSLEEP = "50_localcrawl_busysleep";
// 60_remotecrawlloader