Hi, Suddenly today my sync gatway stopped responding. so i stopped and started again. But now it is showing running. But still it is not working. even my couchbase server showing empty bucket as well. Is it mean of did i lost my entire data on server?
How SG stopped responding. Did it return errors from the API, or just hang on requests?
Provide, or look in the Sync Gateway logs to see if there’s anything indicating why it stopped responding in the first place? SG shouldn’t need to be restarted, so it suggests an underlying problem elsewhere.
It appears you’re not authenticating with Couchbase server correctly from Sync Gateway.
2018-05-11T14:13:41.308Z Opening db /db as bucket “default”, pool “default”, server http://myipaddress:8091
2018-05-11T14:13:41.308Z GoCBCustomSGTranscoder Opening Couchbase database default on http://myipaddress:8091 as user “default”
2018-05-11T14:13:41.311Z WARNING: Error opening bucket: default. Error: authentication error – base.GetCouchbaseBucketGoCB() at bucket_gocb.go:118
This will solve the authentication issue you’re seeing.
As for the empty bucket, check if you have any filters set in the Couchbase Server UI that would be hiding things, and also check the values on the main ‘Bucket’ page to verify the number of documents you have:
Your logs show the first run of Sync Gateway was using a Walrus database, which is an in-memory store that is not persisted by default. This explains why you see no documents in Couchbase Server, and this also explains your out of memory error, as you would have put in more documents than can fit in your system memory.
You need to connect Sync Gateway to a Couchbase server for persistence of documents. You’re still facing the same authentication issues, so check the RBAC user you created in Couchbase has the correct permissions for the bucket you’re connecting to, and verify that the username and password used in your sync gateway config are correct.
Yes, the username and password you specified when you created an RBAC user are the ones you need to add into the config.
The default data store for Sync Gateway is Walrus so that developers can get started without the need for Couchbase Server to be running. However, as noted in the “Getting Started” page of the documentation, documents in Walrus are not persisted, and Walrus is not intended to be used for production data.