Skip to content

Commit

Permalink
Merge pull request #902 from couchbase/feature/issue_859
Browse files Browse the repository at this point in the history
Expose tcp keep alive settings via Sync Gateway config
  • Loading branch information
adamcfraser committed Jun 4, 2015
2 parents d172464 + b69d6b4 commit 21c7cb1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/github.com/couchbase/go-couchbase
2 changes: 1 addition & 1 deletion src/github.com/couchbase/gomemcached
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type ServerConfig struct {
StatsReportInterval *float64 // Optional stats report interval (0 to disable)
MaxCouchbaseConnections *int // Max # of sockets to open to a Couchbase Server node
MaxCouchbaseOverflow *int // Max # of overflow sockets to open
CouchbaseKeepaliveInterval *int // TCP keep-alive interval between SG and Couchbase server
SlowServerCallWarningThreshold *int // Log warnings if database calls take this many ms
MaxIncomingConnections *int // Max # of incoming HTTP connections to accept
MaxFileDescriptors *uint64 // Max # of open file descriptors (RLIMIT_NOFILE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ func NewServerContext(config *ServerConfig) *ServerContext {
couchbase.PoolOverflow = *config.MaxCouchbaseOverflow
}

if config.CouchbaseKeepaliveInterval != nil {
couchbase.SetTcpKeepalive(true, *config.CouchbaseKeepaliveInterval)
}

slow := kDefaultSlowServerCallWarningThreshold
if config.SlowServerCallWarningThreshold != nil {
slow = *config.SlowServerCallWarningThreshold
Expand Down
2 changes: 1 addition & 1 deletion sync_gateway.sublime-project
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
".*"
],
"follow_symlinks": true,
"path": "src/github.com/couchbaselabs/go-couchbase"
"path": "src/github.com/couchbase/go-couchbase"
},
{
"file_exclude_patterns":
Expand Down

0 comments on commit 21c7cb1

Please sign in to comment.