Apache Nutch is an extensible and scalable web crawler
Expire all finished addresses. When sites request long crawl delays this quickly ties down all threads, and lock expiration heppens rarely and proceeds too slowly to remove all expired entries.
Andrzej Bialecki63f0b64dd94f
diff --git a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.javaindex 861dc602d..7b0b1dc09 100644--- a/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java+++ b/src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java@@ -315,8 +315,8 @@ public abstract class HttpBase implements Protocol {host = url.getHost();if (host == null)throw new HttpException("Unknown host for url: " + url);- host = host.toLowerCase();}+ host = host.toLowerCase();int delays = 0;while (true) {@@ -383,8 +383,6 @@ public abstract class HttpBase implements Protocol {if (time <= System.currentTimeMillis()) {BLOCKED_ADDR_TO_TIME.remove(host);BLOCKED_ADDR_QUEUE.removeLast();- } else {- break;}}}