Bug 60386

Summary: Sequential refreshes in Chromium cause warnings from Http2UpgradeHandler pruneClosedStreams
Product: Tomcat 8 Reporter: Evgenij Ryazanov <katzyn>
Component: ConnectorsAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 8.5.x-trunk   
Target Milestone: ----   
Hardware: All   
OS: All   

Description Evgenij Ryazanov 2016-11-17 04:33:52 UTC
If F5 is pressed and holded on some page accessed via HTTP/2 in Chromium 54, Tomcat produces warnings.

6:57:23 AM org.apache.coyote.http2.Http2UpgradeHandler pruneClosedStreams
WARNING: Connection [297] Failed to fully prune the connection because streams were active / used in the priority tree. There are [8] too many streams
6:57:37 AM org.apache.coyote.http2.Http2UpgradeHandler pruneClosedStreams
WARNING: Connection [297] Failed to fully prune the connection because streams were active / used in the priority tree. There are [18] too many streams
.....
7:01:13 AM org.apache.coyote.http2.Http2UpgradeHandler pruneClosedStreams
WARNING: Connection [297] Failed to fully prune the connection because streams were active / used in the priority tree. There are [678] too many stream

This issue is not reproducible with Firefox 49.

It may be a browser bug, but anyway this sutuation should be handled without much noise on production servers.
Comment 1 Remy Maucherat 2016-11-17 08:34:47 UTC
(In reply to Evgenij Ryazanov from comment #0)
> It may be a browser bug, but anyway this sutuation should be handled without
> much noise on production servers.

I disagree with that. This looks to me like rather legitimate logging. If you don't like it, you should adjust the log category level, but no change will be made in Tomcat about this.

We will determine if the rest is a bug or a client issue (in such a scenario, it could simply abruptly disconnect).
Comment 2 Evgenij Ryazanov 2016-11-18 00:44:11 UTC
The only issue with logging is that single one connection produces a lot of similar records and all of them have WARNING level, from my point of view it's may be better to log following at DEBUG level.

But this bug report is not about log pollution. Number of streams can increase beyond any reasonable limit and this can be used by malicious client to exhaust resources on server. Also it's not clear for me why regular web browser creates so many streams, it's browser's fault, or something wrong with streams on server side?
Comment 3 Mark Thomas 2016-11-24 11:50:23 UTC
Chrome structures the priority tree in an unexpected way so Tomcat is unable to prune it. I'm in the process of writing a more sophisticated pruning algorithm.
Comment 4 Mark Thomas 2016-11-24 14:42:05 UTC
Fixed in:
- trunk for 9.0.0.M14 onwards
- 8.5.x for 8.5.9 onwards