Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Experiment with adding timeouts to tpc socket #356

Closed
wants to merge 1 commit into from

Conversation

zmanian
Copy link
Contributor

@zmanian zmanian commented Sep 22, 2019

@mdyring ran into the KMS just silently stalling. #352

I briefly looked at what switching to async_std would look like but it was pretty invasive.

@tarcieri thoughts on just adding a timeout on the socket like this?

Depending on what you thinking, I can pipe through a config value for setting this.

@tarcieri
Copy link
Contributor

tarcieri commented Sep 22, 2019

@zmanian these timeouts generally don’t work. They naively seem like a good solution but are triggered by events in the TCP state machine and therefore only work when the network is reliable and fail when it isn’t working. A proper timeout solution needs to be tied into the underlying I/O multiplexing abstraction and anything less is extremely brittle.

@mdyring
Copy link
Contributor

mdyring commented Sep 22, 2019

Come to think of it, is TCP keepalive enabled on the socket? I suspect it is not - since otherwise in my experience a blocking read would fail eventually.

Re. timeout on blocking read/write I haven't experienced them not working (which I think is what @tarcieri is hinting at), but AFAIR it's always been with TCP keepalive enabled as well.

@zmanian zmanian closed this Sep 22, 2019
@tarcieri tarcieri deleted the zaki/timeouts_on_kms_socket branch December 13, 2019 01:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants