com.couchbase.client.core.RequestCancelledException: Request cancelled in-flight issue in 6.0.4 onwards version


recently we upgraded from 6.0.3 to 6.5.1 and flooded with “Request cancelled in-flight issue”.

Tried to understand issue and found below related couchbase article -

As per the article, it is highlighting a new server timeout added to avoid Slowloris dos attack.
(that disconnects connections if HTTPS request made and no data transferred on same for 5 sec)

And in my application we are maintaining a connection pool, there we have a high chance we are establishing some connection but not sending any data on it for a while.
so because Server considers pool connections as DOS attack and disconnects.

As per the solution to this problem, article is suggesting to reduce KeepAliveInterval time to less than 5.

but this solution looks very inappropriate, we are forcing KeepAliveInterval configuration to very less value that could cause too many pings to CB server.

please suggest if this solution is production friendly.

Hello Naveen_Nisad,

For most users there’s no impact from this issue, as an active cluster with ongoing operations has no need to actively send keep-alive requests. There was already a 30 second threshold that by default would close an idle connection, this has now been lowered to 5 seconds to prevent a security issue (CVE-2020-9041).
A properly sized cluster is easily able to handle many thousands, and in some cases, millions of operations per second. If your clients are inactive and only sending a keep alive every few seconds, it’s very unlikely to have any impact to you. Alternatively you can close your socket at the client side before it times out on the server side by lowering your client timeout period.

Thank you,
Ian McCloy (Principal Product Manager, Couchbase)