-
Notifications
You must be signed in to change notification settings - Fork 642
Description
Version of driver: v2.0.0 (latest)
Go version: 1.24
Cassandra version: 5.0.4
If set global Session Timeout equal 1*time.Second or less in logs we can see a lot of messages:
"message":"Pool connection error.","addr":"10.239.171.143:9042","err":"read tcp 10.221.55.21:53299->10.229.171.143:9042: i/o timeout"
The same thing happens with long timeouts, but less often.
I tracked the full error flow:
Conn.serve -> Conn.recv -> Conn.processFrame -> readHeader -> connReader.Read -> Conn.serve -> Conn.closeWithError ->hostConnPool.HandleError
So the driver keeps getting read/timeout errors and closes the connection with error and establishes a new one (and so on all the time).
The most surprising thing is that Cassandra's response time doesn't exceed 40ms at 99.9p. The go client isn't under any load.
Also I've found, the Heartbeat connection is established with a general timeout, not a Connect timeout (which isn't entirely accurate). However, debugging has shown that this isn't the reason the connection is closed.
Constant client-side reconnects put a strain on Cassandra.