Syncgateway 2.7.2 No such prepared statement error

I am getting below errors in Sync Gateway 2.7.2 CE and Couchbase 6.5.0 CE

`

> [WRN] Error when querying index using statement: [SELECT [op.name, LEAST(meta(bucket).xattrs._sync.sequence, op.val.seq),IFMISSING(op.val.rev,null),IFMISSING(op.val.del,null)][1] AS seq, [op.name, LEAST(meta(bucket).xattrs._sync.sequence, op.val.seq),IFMISSING(op.val.rev,null),IFMISSING(op.val.del,null)][2] AS rRev, [op.name, LEAST(meta(bucket).xattrs._sync.sequence, op.val.seq),IFMISSING(op.val.rev,null),IFMISSING(op.val.del,null)][3] AS rDel, meta(bucket).xattrs._sync.rev AS rev, meta(bucket).xattrs._sync.flags AS flags, META(bucket).id AS id FROM bucket USE INDEX (sg_channels_x1) UNNEST OBJECT_PAIRS(meta(bucket).xattrs._sync.channels) AS op WHERE [op.name, LEAST(meta(bucket).xattrs._sync.sequence, op.val.seq),IFMISSING(op.val.rev,null),IFMISSING(op.val.del,null)] BETWEEN [$channelName, $startSeq] AND [$channelName, $endSeq] ORDER BY seq LIMIT 100] parameters: [map[channelName:947051868695804 endSeq:7566430 startSeq:7483407]] error:[4040] No such prepared statement: 9064b560-4db9-5afa-8820-0fb522f2471b -- base.(*CouchbaseBucketGoCB).Query() at bucket_n1ql.go:76

`

When I manually run the prepare statement on Console, it works fine. I dont see any functional bug however.
This started coming when we moved to multi node sync gateway cluster. On single node same setup was not throwing any such errors.

Can anyone comment? Whether any open issue or should I raise issue on Github?

Hi @pvaghasi, did you get an answer to this request? Did you resolve the issue?

We’re experiencing the same issue with an upgrade of couchbase community from 6.0 to 6.6 with sync gateway 2.5.

Kind Regards,
Morné

Please upgrade to Sync Gateway 2.7.4 which has this issue resolved. We expect it to be in our latest 2.8.0 release as well but @bbrks to confirm the same
Also, restarting the Sync Gateway should fix it

Hi @priya.rajagopal,

Thank you very much for your response. I can confirm that upgrading sync gateway to version 2.7.4 does in fact fix the issue.

Kind Regards,
Morné