Try to alleviate connection-limit network collapse:
* Transport: - Lower min NTCP idle time to 3m (was 5m) - Increase SSU conn limit by 33% * Watchdog: - Defang him again
This commit is contained in:
@ -49,8 +49,8 @@ class RouterWatchdog implements Runnable {
|
||||
}
|
||||
|
||||
private boolean shutdownOnHang() {
|
||||
// prop default true
|
||||
if (!Boolean.valueOf(_context.getProperty("watchdog.haltOnHang", "true")).booleanValue())
|
||||
// prop default false
|
||||
if (!Boolean.valueOf(_context.getProperty("watchdog.haltOnHang")).booleanValue())
|
||||
return false;
|
||||
|
||||
// Client manager starts complaining after 10 minutes, and we run every minute,
|
||||
@ -94,7 +94,7 @@ class RouterWatchdog implements Runnable {
|
||||
long used = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory();
|
||||
_log.error("Memory: " + DataHelper.formatSize(used) + '/' + DataHelper.formatSize(max));
|
||||
if (_consecutiveErrors == 1) {
|
||||
_log.log(Log.CRIT, "Router appears hung! Will restart in 20 minutes if it doesn't fix itself");
|
||||
_log.log(Log.CRIT, "Router appears hung, or there is severe network congestion. Watchdog starts barking!");
|
||||
// This might work on linux...
|
||||
// It won't on windows, and we can't call i2prouter.bat either, it does something
|
||||
// completely different...
|
||||
|
@ -106,6 +106,9 @@ public abstract class TransportImpl implements Transport {
|
||||
! ((FloodfillNetworkDatabaseFacade)_context.netDb()).floodfillEnabled())
|
||||
def = MAX_CONNECTION_FACTOR * (1 + bw - Router.CAPABILITY_BW12);
|
||||
}
|
||||
// increase limit for SSU, for now
|
||||
if (style.equals("udp"))
|
||||
def = def * 4 / 3;
|
||||
return _context.getProperty("i2np." + style + ".maxConnections", def);
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,8 @@ public class EventPumper implements Runnable {
|
||||
* the time to iterate across them to check a few flags shouldn't be a problem.
|
||||
*/
|
||||
private static final long FAILSAFE_ITERATION_FREQ = 2*1000l;
|
||||
private static final long MIN_EXPIRE_IDLE_TIME = 5*60*1000l;
|
||||
/** tunnel test is every 30-60s, so this should be longer than, say, 3*45s to allow for drops */
|
||||
private static final long MIN_EXPIRE_IDLE_TIME = 3*60*1000l;
|
||||
private static final long MAX_EXPIRE_IDLE_TIME = 15*60*1000l;
|
||||
|
||||
public EventPumper(RouterContext ctx, NTCPTransport transport) {
|
||||
|
Reference in New Issue
Block a user