mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
more logging for OOMs
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7534 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
b1781d7aae
commit
89d337841c
|
@ -731,11 +731,13 @@ public final class serverCore extends AbstractBusyThread implements BusyThread {
|
|||
try {
|
||||
result = commandMethod.invoke(this.commandObj, parameter);
|
||||
} catch (OutOfMemoryError e) {
|
||||
log.logWarning("commandMethod.invoke: OutOfMemoryError / 1 (retry1 follows)");
|
||||
// try again
|
||||
terminateOldSessions(2000);
|
||||
try {
|
||||
result = commandMethod.invoke(this.commandObj, parameter);
|
||||
} catch (OutOfMemoryError e2) {
|
||||
log.logWarning("commandMethod.invoke: OutOfMemoryError / 2 (retry2 follows)");
|
||||
// try again
|
||||
Thread.sleep(1000);
|
||||
result = commandMethod.invoke(this.commandObj, parameter);
|
||||
|
|
|
@ -191,7 +191,7 @@ public class yacySearch extends Thread {
|
|||
indexSegment, peers, containerCache, secondarySearchSuperviser, blacklist, rankingProfile, constraint);
|
||||
searchThreads[i].start();
|
||||
} catch (OutOfMemoryError e) {
|
||||
e.printStackTrace();
|
||||
Log.logException(e);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,6 +34,8 @@ import java.util.concurrent.Future;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import net.yacy.kelondro.logging.Log;
|
||||
|
||||
import jcifs.smb.SmbException;
|
||||
import jcifs.smb.SmbFile;
|
||||
|
||||
|
@ -86,6 +88,7 @@ public class TimeoutRequest<E> {
|
|||
throw new ExecutionException(e);
|
||||
}
|
||||
} catch (OutOfMemoryError e) {
|
||||
Log.logWarning("TimeoutRequest.call", "OutOfMemoryError / retry follows", e);
|
||||
// in case that no memory is there to create a new native thread
|
||||
try {
|
||||
return this.call.call();
|
||||
|
|
Loading…
Reference in New Issue
Block a user