How can we increase n1ql timeout in the sync gateway?

We are running into the 75s timeout when the sync gateway is querying the server for changes. We have updated the databases.foo_db.view_query_timeout_secs to 300 since we are attempting load a large amount of documents, but the timeout is still happening at 75s. Are there any other updates that are needed?

These errors are logged to the sync gateway error logs:
[WRN] Error when querying index using statement: [SELECT meta({db}).xattrs._sync.sequence AS seq, meta({db}).xattrs._sync.rev AS rev, meta({db}).xattrs._sync.flags AS flags, META({db}).id AS id FROM {db}WHERE meta({db}).xattrs._sync.sequence >= $startSeq AND meta({db}).xattrs._sync.sequence < $endSeq AND META().id NOT LIKE ‘\_sync:%’] – base.(CouchbaseBucketGoCB).Query() at bucket_n1ql.go:63
[WRN] MultiChangesFeed got error reading changes feed "
": [1080] Timeout 1m15s exceeded – db.(*Database).SimpleMultiChangesFeed.func1() at changes.go:493

Thanks for the help!

Hi @jblackburn,

There’s a bug in current versions of Sync Gateway that makes the view_query_timeout configuration option ineffective, and capped at 75 seconds (see issue: #3839)

This has been fixed in an upcoming SG 2.5.0 version, which we hope to be releasing soon.

Thanks for the update. We’ll be watching for the new release.