Sync Gateway hangs suddenly even accessed via localhost

Sync Gateway hangs with below command

curl -X GET http://localhost:4985/db/_changes
No luck with 4984 also.

Sometimes work and most of the times hangs. Never faced this issue before.

Absolutely no errors in the logs. everything is normal

I am using
sync-gateway:2.8.3-community

Restarted many times. Upgraded from 2.8.0 but still it hangs.

There are 3 nodes running, only node with import_docs set to true hangs

could you check and provide sync gateway logs? It’s hard to tell what happened based on what you described, but please check the following:

  1. verify if sync gateway service is up and running, I am not sure what OS the sync gateway is deployed, please get the command for the OS and check sync_gateway service status
  2. get sync gateway logs. in your sync gateway deployed location, pull sg_error.log under logs subdirectory
  3. or you can try to start sync gateway from CLI Using the Command Line | Couchbase Docs and see if there is error in the output.

it’s possible there is something wrong in sync gateway config, or there is an issue to connect to your couchbase server. bucket name, user credential, certificates may be other things to check.

what was the last known working version? 2.7.x? you mentioned about 2.8.0 and 2.8.3, with both the versions, you have experienced the hanging issues, is that right?

Yes thats right.
Sorry could not get logs earlier. But frankly there was nothing wrong with logs. No warning or errors.

I updated couchbase to 7.0.0 and its working fine till now. Earlier it was 6.6.0

The /_changes API results when not cached by Sync Gateway are backfilled using a request plus view or query run on Couchbase Server, it’s possible that query was taking an abnormally long time to return results back to SG, which could be for a number of reasons given the request plus consistency level.

1 Like