Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
configuration of time-out for fetching seed-lists during bootstraping (weil das beim linuxtag nur auf meinem Notebook nicht funtioniert)
orbiterfe4ad214f10e
diff --git a/source/de/anomic/yacy/yacyPeerActions.java b/source/de/anomic/yacy/yacyPeerActions.javaindex 9ef1d5e32..491ba7667 100644--- a/source/de/anomic/yacy/yacyPeerActions.java+++ b/source/de/anomic/yacy/yacyPeerActions.java@@ -74,6 +74,7 @@ public class yacyPeerActions {public long seniorConnects;public long principalConnects;public long disconnects;+ private int bootstrapLoadTimeout;public yacyPeerActions(yacySeedDB seedDB, plasmaSwitchboard switchboard, File superseedFile, String superseedURL) {this.seedDB = seedDB;@@ -87,6 +88,7 @@ public class yacyPeerActions {this.seniorConnects = 0;this.principalConnects = 0;this.disconnects = 0;+ this.bootstrapLoadTimeout = (int) switchboard.getConfigLong("bootstrapLoadTimeout", 6000);}public void deploy(yacyPeerAction action) {@@ -181,14 +183,14 @@ public class yacyPeerActions {reqHeader.put(httpHeader.CACHE_CONTROL,"no-cache");url = new URL(seedListFileURL);- header = httpc.whead(url, 5000, null, null, this.sb.remoteProxyConfig,reqHeader);+ header = httpc.whead(url, this.bootstrapLoadTimeout, null, null, this.sb.remoteProxyConfig,reqHeader);if ((header == null) || (header.lastModified() == null)) {yacyCore.log.logInfo("BOOTSTRAP: seed-list URL " + seedListFileURL + " not available");} else if ((header.age() > 86400000) && (ssc > 0)) {yacyCore.log.logInfo("BOOTSTRAP: seed-list URL " + seedListFileURL + " too old (" + (header.age() / 86400000) + " days)");} else {ssc++;- seedList = httpc.wget(url, 5000, null, null, this.sb.remoteProxyConfig,reqHeader);+ seedList = httpc.wget(url, this.bootstrapLoadTimeout, null, null, this.sb.remoteProxyConfig,reqHeader);enu = seedList.iterator();lc = 0;while (enu.hasNext()) {diff --git a/yacy.init b/yacy.initindex 433850d34..357469896 100644--- a/yacy.init+++ b/yacy.init@@ -38,6 +38,14 @@ port = 8080superseedFile=superseed.txtsuperseedLocation=http://www.yacy.net/superseed.txt+# bootstrapLoadTimeout+# this is the time-out for loading of the seedlist files during bootstraping+# the time may not too long, since loading of the seedlist is not parallelized+# and a not successful loading of a seed file may prevent a peer from becoming+# a (at least) junior status. If the time-out is too short, there is the danger+# that the peer stays in virgin mode+bootstrapLoadTimeout = 6000+# time-out of client control socket in milliseconds# since this applies only to the client-proxy connection,# it can be rather short