Details
-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
None
-
None
Description
Support has reported issues running in Azure environments, where the Azure VM idle timeout appears to be killing connections that do not have a keep-alive configured.
In Sync Gateway 1.4, the fix for this (via go-couchbase) is to:
1. Call SetKeepAlive and SetKeepAlivePeriod on the memcached TCPConn.
2. Use the DefaultTransport as the starting point when creating an HTTPClient, to pick up the default DialContext settings. (https://golang.org/pkg/net/http/#RoundTripper)
I don't believe gocb currently supports either of the above two options.
For TCP, keep alive isn't being set:
https://github.com/couchbase/gocbcore/blob/ace0f2ec0d007700390c2eb073a6a7fc9ee58f2d/memdconn.go#L41
For HTTP, gocb builds a custom transport from scratch that doesn't include DialContext settings:
https://github.com/couchbase/gocbcore/blob/v7/agent.go#L335
From previous conversations with Brett Lawson, this may be by design on the TCP side, but I'd like to hear more specifics about why that's not needed to support something like the Azure environment.
Attachments
For Gerrit Dashboard: GOCBC-233 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
83312,1 | GOCBC-233: Specify timeout values for HTTP connections. | master | gocbcore | Status: ABANDONED | +2 | +1 |
83355,2 | GOCBC-233: Specify timeout values for HTTP connections. | v7 | gocbcore | Status: MERGED | +2 | +1 |