Changeset 4c4b3b7


Ignore:
Timestamp:
Jun 6, 2009 3:14:05 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
834bfde
Parents:
7e651d5
Message:

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
Location:
router/java/src/net/i2p/router
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/RouterWatchdog.java

    r7e651d5 r4c4b3b7  
    5050   
    5151    private boolean shutdownOnHang() {
    52         // prop default true
    53         if (!Boolean.valueOf(_context.getProperty("watchdog.haltOnHang", "true")).booleanValue())
     52        // prop default false
     53        if (!Boolean.valueOf(_context.getProperty("watchdog.haltOnHang")).booleanValue())
    5454            return false;
    5555
     
    9595            _log.error("Memory: " + DataHelper.formatSize(used) + '/' + DataHelper.formatSize(max));
    9696            if (_consecutiveErrors == 1) {
    97                 _log.log(Log.CRIT, "Router appears hung!  Will restart in 20 minutes if it doesn't fix itself");
     97                _log.log(Log.CRIT, "Router appears hung, or there is severe network congestion.  Watchdog starts barking!");
    9898                // This might work on linux...
    9999                // It won't on windows, and we can't call i2prouter.bat either, it does something
  • router/java/src/net/i2p/router/transport/TransportImpl.java

    r7e651d5 r4c4b3b7  
    107107                def = MAX_CONNECTION_FACTOR * (1 + bw - Router.CAPABILITY_BW12);
    108108        }
     109        // increase limit for SSU, for now
     110        if (style.equals("udp"))
     111            def = def * 4 / 3;
    109112        return _context.getProperty("i2np." + style + ".maxConnections", def);
    110113    }
  • router/java/src/net/i2p/router/transport/ntcp/EventPumper.java

    r7e651d5 r4c4b3b7  
    5252     */
    5353    private static final long FAILSAFE_ITERATION_FREQ = 2*1000l;
    54     private static final long MIN_EXPIRE_IDLE_TIME = 5*60*1000l;
     54    /** tunnel test is every 30-60s, so this should be longer than, say, 3*45s to allow for drops */
     55    private static final long MIN_EXPIRE_IDLE_TIME = 3*60*1000l;
    5556    private static final long MAX_EXPIRE_IDLE_TIME = 15*60*1000l;
    5657   
Note: See TracChangeset for help on using the changeset viewer.