Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Connection problems and possible fix #796

Closed
juanjux opened this issue Aug 7, 2019 · 1 comment
Closed

Connection problems and possible fix #796

juanjux opened this issue Aug 7, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@juanjux
Copy link
Contributor

juanjux commented Aug 7, 2019

From slack by @ajnavarro:

  • Adding keepalive at the TCP level.
  • Use NewListenerWithConfig and add a cfg.Listener that generates a Conn object we can handle.

net.Conn has two methods: https://golang.org/pkg/net/#TCPConn.SetKeepAlive and https://golang.org/pkg/net/#TCPConn.SetKeepAlivePeriod

Related: src-d/gitbase-spark-connector-enterprise#81

@juanjux juanjux self-assigned this Aug 7, 2019
@ajnavarro ajnavarro added the bug Something isn't working label Aug 9, 2019
@juanjux
Copy link
Contributor Author

juanjux commented Aug 9, 2019

I'll close this and open two new issues because the problem is two-fold:

  1. Connection timeouts from Vitess doesn't trigger, and thus stop the query, is a query is running but not sending anything.

#799

  1. Closed connections, for other reasons than timeouts, for example a killed client, don't stop the query. In this case the connection should stop even if there isn't a timeout. The problem is that the socket is not checked until the timeout runs.

#800

@juanjux juanjux closed this as completed Aug 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants