Skip to content

Commit

Permalink
Increase the min max queue size to match 7 and 8
Browse files Browse the repository at this point in the history
  • Loading branch information
amcasey authored and wtgodbe committed Oct 18, 2023
1 parent 4a5b77e commit f1e18e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,11 @@ public Http2Connection(HttpConnectionContext context)
? 4 * http2Limits.MaxStreamsPerConnection // 4 is a magic number to give us some padding above the expected maximum size
: (int)ConfiguredMaximumFlowControlQueueSize;

if (IsMaximumFlowControlQueueSizeEnabled && _maximumFlowControlQueueSize < http2Limits.MaxStreamsPerConnection)
var minimumMaximumFlowControlQueueSize = 2 * http2Limits.MaxStreamsPerConnection; // Double to match 7.0 and 8.0
if (IsMaximumFlowControlQueueSizeEnabled && _maximumFlowControlQueueSize < minimumMaximumFlowControlQueueSize)
{
Log.Http2FlowControlQueueMaximumTooLow(context.ConnectionId, http2Limits.MaxStreamsPerConnection, _maximumFlowControlQueueSize);
_maximumFlowControlQueueSize = http2Limits.MaxStreamsPerConnection;
Log.Http2FlowControlQueueMaximumTooLow(context.ConnectionId, minimumMaximumFlowControlQueueSize, _maximumFlowControlQueueSize);
_maximumFlowControlQueueSize = minimumMaximumFlowControlQueueSize;
}

// Start pool off at a smaller size if the max number of streams is less than the InitialStreamPoolSize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ public void Http2FlowControlQueueOperationsExceeded(string connectionId, int cou
Http2FlowControlQueueOperationsExceeded(_http3Logger, connectionId, count);
}

[LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size {Actual} is less than the maximum streams per connection {Expected}. Increasing configured value to {Expected}.", EventName = "Http2FlowControlQueueMaximumTooLow")]
[LoggerMessage(56, LogLevel.Debug, @"Connection id ""{ConnectionId}"" configured maximum flow control queue size {Actual} is less than double the maximum streams per connection {Expected}. Increasing configured value to {Expected}.", EventName = "Http2FlowControlQueueMaximumTooLow")]
private static partial void Http2FlowControlQueueMaximumTooLow(ILogger logger, string connectionId, int expected, int actual);

public void Http2FlowControlQueueMaximumTooLow(string connectionId, int expected, int actual)
Expand Down

0 comments on commit f1e18e2

Please sign in to comment.