From f5df8a3605daab08863db22bce9ef743360437d7 Mon Sep 17 00:00:00 2001 From: Michael Vandeberg Date: Mon, 16 Oct 2017 16:11:20 -0700 Subject: [PATCH 1/2] Increase the active ignored request timeout to 6 seconds #1660 --- libraries/net/node.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index 888193fd8d..0a83f1d849 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -1370,7 +1370,9 @@ namespace graphene { namespace net { namespace detail { // 1 second seems reasonable. When we get closer to our eventual target of 1 second // blocks, this will need to be re-evaluated (i.e., can we set the timeout to 500ms // and still handle normal network & processing delays without excessive disconnects) - fc::microseconds active_ignored_request_timeout = fc::seconds(1); + + // Increased to 6 in #1660 due to heavy load. May need to adjust further + fc::microseconds active_ignored_request_timeout = fc::seconds(6); fc::time_point active_disconnect_threshold = fc::time_point::now() - fc::seconds(active_disconnect_timeout); fc::time_point active_send_keepalive_threshold = fc::time_point::now() - fc::seconds(active_send_keepalive_timeout); From 2aede423156e348d0929b5d600a021e7eb7fd20b Mon Sep 17 00:00:00 2001 From: Michael Vandeberg Date: Mon, 16 Oct 2017 17:12:02 -0700 Subject: [PATCH 2/2] Update comment for active ignored request timeout #1660 --- libraries/net/node.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index 0a83f1d849..19ed390fa8 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -1361,17 +1361,13 @@ namespace graphene { namespace net { namespace detail { uint32_t active_disconnect_timeout = 10 * _recent_block_interval_in_seconds; uint32_t active_send_keepalive_timeout = active_disconnect_timeout / 2; - // set the ignored request time out to 1 second. When we request a block + // set the ignored request time out to 6 second. When we request a block // or transaction from a peer, this timeout determines how long we wait for them // to reply before we give up and ask another peer for the item. // Ideally this should be significantly shorter than the block interval, because // we'd like to realize the block isn't coming and fetch it from a different - // peer before the next block comes in. At the current target of 3 second blocks, - // 1 second seems reasonable. When we get closer to our eventual target of 1 second - // blocks, this will need to be re-evaluated (i.e., can we set the timeout to 500ms - // and still handle normal network & processing delays without excessive disconnects) - - // Increased to 6 in #1660 due to heavy load. May need to adjust further + // peer before the next block comes in. + // Increased to 6 from 1 in #1660 due to heavy load. May need to adjust further fc::microseconds active_ignored_request_timeout = fc::seconds(6); fc::time_point active_disconnect_threshold = fc::time_point::now() - fc::seconds(active_disconnect_timeout);