tendermint / tmkms

Key Management service for Tendermint Validator nodes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TCP timeouts are far too low

tarcieri opened this issue · comments

The timeout of 2 seconds here:

https://github.com/tendermint/kms/blob/master/src/connection/tcp.rs#L27

...causes the KMS to timeout and reconnect to the validator constantly with:

I/O error: Resource temporarily unavailable (os error 11)

It manages to keep signing without missing blocks when this happens, but constantly dropping the TCP connection and renegotiating Secret Connection is probably not a good state of affairs.

The timeout should probably default to something much higher (e.g. 10 seconds, or at least something a bit higher than the average consensus time), and perhaps be adjustable in the event people really want it to time out and renegotiate TCP and Secret Connection every 2 seconds.

cc @mdyring

Fixed in #379, which changed the default to 10s but made it configurable