Wrong documentation for sync gateway 2.0


The TCP Keepalive settings mentioned in below documentation is said to lower the timing from 2 hours to 30 minutes.
net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_keepalive_intvl = 10
net.ipv4.tcp_keepalive_probes = 9

But what I have read and understood is that first parameter is in seconds after which connection inactivity is determined after which the first keep alive request is sent.

So the value shown in documentation is 10 minutes and not 30 minutes as mentioned in below doc


I request couch base team to go through the documentation before updating it for public use as this creates confusion.

Like wise this also happened in following document
where we are describing configuration for sync gateway 2.0 but then mentioning Sync Gateway 1.5’s configuration setting also. This confuses the end user whether to keep import_docs as true or “continuous”.

This should be made clear.

Pankaj Sharma


Thank you for your feedback,. Please post documentation issues using the “Feedback” link on the corresponding pages (CC @amarantha, @jamiltz)


So the value shown in documentation is 10 minutes and not 30 minutes as mentioned in below doc

@pankaj.sharma I think you’re right about incorrect docs here. From what I can tell this will wait 10 minutes (600 seconds), and then 90 more seconds (10 s interval * 9 tries). To get 30 minutes total after an initial 10 minute wait, the params should be:

net.ipv4.tcp_keepalive_time = 600
net.ipv4.tcp_keepalive_intvl = 60
net.ipv4.tcp_keepalive_probes = 20

I will file a docs issue to correct this.


There’s a PR up to fix this in https://github.com/couchbaselabs/couchbase-mobile-portal/pull/867


I agree it’s confusing. Here’s an attempt to clear it up:

In 2.0:

import_docs = true is for the “legacy import”, which has since been removed from Sync Gateway as of 2.1
import_docs = continuous is for the “shared bucket access” feature (XATTRS).

In 2.1:

import_docs = true is for the “shared bucket access” feature (XATTRS).
import_docs = continuous is for the “shared bucket access” feature (XATTRS) – for backwards compatibility.

The docs were updated in https://github.com/couchbase/sync_gateway/issues/3543, so hopefully it will be less confusing after 2.1 is released.


Hi @traun,

Thanks for the prompt actions. But

Is still confusing, So are we saying if we want to have CBS 5.1 with SyncGateway 2.0 and want to reflect the changes done on the server side(CBS) directly without using sync gateway (i.e. update query using N1QL in the documents) then we should have import_docs=“continuous” along with the shared bucket access ?

CC:- @househippo

Pankaj Sharma


The full documentation on how to use shared bucket access (including the import settings) can be found here:

I think that should cover your questions, but let us know if anything isn’t clear.