I'm really stumped. In my server logs I'm seeing:
org.apache.coyote.CloseNowException: Connection [215], Stream [95], This stream is not writable
at org.apache.coyote.http2.Http2UpgradeHandler.reserveWindowSize(Http2UpgradeHandler.java:843) ~[tomcat-coyote.jar:9.0.30]
at org.apache.coyote.http2.Stream$StreamOutputBuffer.flush(Stream.java:940) ~[tomcat-coyote.jar:9.0.30]
at org.apache.coyote.http2.Stream$StreamOutputBuffer.doWrite(Stream.java:859) ~[tomcat-coyote.jar:9.0.30]
at org.apache.coyote.http2.Http2OutputBuffer.doWrite(Http2OutputBuffer.java:59) ~[tomcat-coyote.jar:9.0.30]
at org.apache.coyote.Response.doWrite(Response.java:601) ~[tomcat-coyote.jar:9.0.30]
It seems to happen when a user clicks too quickly, but that makes no sense, as Tomcat should be able to serve plenty of requests. This is on a server with a very light load, maybe 2 or 3 HTTP requests per second, on a very fast machine.
This is with Spring Boot 2 and Tomcat 9.0.30. It's really perplexing.
I did see a similar question on SO where someone got this using a web push, but we're not.
Here's how our HTTP/2 connector is configured:
<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
maxThreads="150" SSLEnabled="true"
keystoreFile="/etc/ssl/keys.p12"
keystorePass="changeit"
keyAlias="tomcat"
sslProtocol="TLS"
sslEnabledProtocols="TLSv1.3,TLSv1.2"
connectionTimeout="20000"
>
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol"
keepAliveTimeout="20000"
/>
</Connector>
It's running on JDK 13.0.2 on Ubuntu server 18.04.
Any ideas on this? It's definitely something users notice and I have no clue about how to solve this.