Skip to content

Can I reconnect on RedisCommandTimeoutException? #2870

Answered by tishun
e-ts asked this question in Q&A
Discussion options

You must be logged in to vote

TCP_USER_TIMEOUT specifies the maximum amount of time that transmitted data may remain unacknowledged, or buffered data may remain untransmitted. In our case, data is acknowledged on TCP layer so TCP_USER_TIMEOUT will not help. We're using it anyway, and keepAlive, but for another reason. They do not help in this specific scenario.

My bad, missed the fact the packages are being acknowledged. You are right, TCP_USER_TIMEOUT is useless in this case.

I can close the entire StatefulGenericConnection on RedisCommandTimeoutException and make some logic to set up a new one but it seems way too blunt for this scenario. Closing just that TCP socket would suffice and it would be nice to make use…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@e-ts
Comment options

@tishun
Comment options

Answer selected by e-ts
@e-ts
Comment options

@tishun
Comment options

@e-ts
Comment options

@tishun
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
for: team-attention An issue we need to discuss as a team to make progress
2 participants