- reduced time-out for socket-connection communication from 20 seconds to 5 seconds. This is a test to find out if the time-out was a cause for problems in metager environments

- turned a fine log entry in case of rejected connections on the server socket into a warning. (look for 'exceeding limit')


git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6051 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 28b86385cd
commit 0fc1168554

@ -127,7 +127,7 @@ public final class serverCore extends serverAbstractBusyThread implements server
private SSLSocketFactory sslSocketFactory = null; private SSLSocketFactory sslSocketFactory = null;
private ServerSocket socket; // listener private ServerSocket socket; // listener
private final int timeout; // connection time-out of the socket private final int timeout; // connection time-out of the socket
serverHandler handlerPrototype; // the command class (a serverHandler) serverHandler handlerPrototype; // the command class (a serverHandler)
private final serverSwitch<?> switchboard; // the command class switchboard private final serverSwitch<?> switchboard; // the command class switchboard
@ -334,8 +334,8 @@ public final class serverCore extends serverAbstractBusyThread implements server
if(this.busySessions.size() >= this.maxBusySessions) if(this.busySessions.size() >= this.maxBusySessions)
{ {
// immediatly close connection if too much sessions are still running // immediately close connection if too much sessions are still running
if (this.log.isFinest()) this.log.logFinest("* connections exceeding limit, closing new incoming connection from "+ controlSocket.getRemoteSocketAddress()); this.log.logWarning("* connections (" + this.busySessions.size() + ") exceeding limit (" + this.maxBusySessions + "), closing new incoming connection from "+ controlSocket.getRemoteSocketAddress());
controlSocket.close(); controlSocket.close();
return false; return false;
} }

@ -270,7 +270,7 @@ public final class yacy {
yacyVersion.latestRelease = version; yacyVersion.latestRelease = version;
// read environment // read environment
final int timeout = Math.max(20000, Integer.parseInt(sb.getConfig("httpdTimeout", "20000"))); final int timeout = Math.max(5000, Integer.parseInt(sb.getConfig("httpdTimeout", "5000")));
// create some directories // create some directories
final File htRootPath = new File(homePath, sb.getConfig("htRootPath", "htroot")); final File htRootPath = new File(homePath, sb.getConfig("htRootPath", "htroot"));

Loading…
Cancel
Save