You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/03/06 18:32:41 UTC

[tomcat] branch 8.5.x updated: Improve logging when streams cannot be pruned.

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new eed1f6a  Improve logging when streams cannot be pruned.
eed1f6a is described below

commit eed1f6a9f27f841bcb6eef8703e833d390b4d80b
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Mar 6 18:13:12 2019 +0000

    Improve logging when streams cannot be pruned.
    
    This is to provide additional information to investigate reports like
    https://bz.apache.org/bugzilla/show_bug.cgi?id=63223
---
 java/org/apache/coyote/http2/Http2UpgradeHandler.java | 6 +++---
 java/org/apache/coyote/http2/LocalStrings.properties  | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/coyote/http2/Http2UpgradeHandler.java b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
index 590f3b2..6f3287e 100644
--- a/java/org/apache/coyote/http2/Http2UpgradeHandler.java
+++ b/java/org/apache/coyote/http2/Http2UpgradeHandler.java
@@ -984,7 +984,7 @@ public class Http2UpgradeHandler extends AbstractStream implements InternalHttpU
                     sm.getString("upgradeHandler.stream.even", key), Http2Error.PROTOCOL_ERROR);
         }
 
-        pruneClosedStreams();
+        pruneClosedStreams(streamId);
 
         Stream result = new Stream(key, this);
         streams.put(key, result);
@@ -1018,7 +1018,7 @@ public class Http2UpgradeHandler extends AbstractStream implements InternalHttpU
     }
 
 
-    private void pruneClosedStreams() {
+    private void pruneClosedStreams(int streamId) {
         // Only prune every 10 new streams
         if (newStreamsSinceLastPrune < 9) {
             // Not atomic. Increments may be lost. Not a problem.
@@ -1130,7 +1130,7 @@ public class Http2UpgradeHandler extends AbstractStream implements InternalHttpU
 
         if (toClose > 0) {
             log.warn(sm.getString("upgradeHandler.pruneIncomplete", connectionId,
-                    Integer.toString(toClose)));
+                    Integer.toString(streamId), Integer.toString(toClose)));
         }
     }
 
diff --git a/java/org/apache/coyote/http2/LocalStrings.properties b/java/org/apache/coyote/http2/LocalStrings.properties
index f9ea1e3..c47e402 100644
--- a/java/org/apache/coyote/http2/LocalStrings.properties
+++ b/java/org/apache/coyote/http2/LocalStrings.properties
@@ -128,7 +128,7 @@ upgradeHandler.notifyAll=Connection [{0}], Stream [{1}], notifyAll() called to r
 upgradeHandler.pause.entry=Connection [{0}] Pausing
 upgradeHandler.prefaceReceived=Connection [{0}], Connection preface received from client
 upgradeHandler.pingFailed=Connection [{0}] Failed to send ping to client
-upgradeHandler.pruneIncomplete=Connection [{0}] Failed to fully prune the connection because streams were active / used in the priority tree. There are [{1}] too many streams
+upgradeHandler.pruneIncomplete=Connection [{0}], Stream [{1}], Failed to fully prune the connection because there are [{2}] too many active streams
 upgradeHandler.pruneStart=Connection [{0}] Starting pruning of old streams. Limit is [{1}] + 10% and there are currently [{2}] streams.
 upgradeHandler.pruned=Connection [{0}] Pruned completed stream [{1}]
 upgradeHandler.prunedPriority=Connection [{0}] Pruned unused stream [{1}] that may have been part of the priority tree


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org