New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyncGateway restart after node automatic failover is taking more time #2396

Closed
ArihantRk opened this Issue Mar 17, 2017 · 10 comments

Comments

Projects
None yet
4 participants
@ArihantRk
Copy link

ArihantRk commented Mar 17, 2017

Sync Gateway version

1.4.0

Operating system

RedHat 7.2

From https://forums.couchbase.com/t/syncgateway-restart-taking-more-time-after-node-automatic-failover/12115

Cluster of 3 nodes is having 60 GB with each document is having size of 10kb. syncgateway restarted after node is fail-over.

Expected behavior

syncgateway should restart immediately

@adamcfraser

This comment has been minimized.

Copy link
Contributor

adamcfraser commented Mar 17, 2017

Is this a new issue you're seeing with 1.4, or something that was also occurring with earlier versions of Sync Gateway?

Is Couchbase Server appearing ready/green in the Couchbase Server Admin Console when Sync Gateway is started?

@ArihantRk

This comment has been minimized.

Copy link

ArihantRk commented Mar 20, 2017

@adamcfraser Issue we are seeing in earlier versions also. Couchbase server is appearing as green status for cluster of 2 nodes.
But we could see index is building in couchbase .

@adamcfraser

This comment has been minimized.

Copy link
Contributor

adamcfraser commented Mar 21, 2017

Gist from forum post (with startup logs):
https://gist.github.com/ArihantRk/190481e8d29f0590212bc926012f1a1c

@adamcfraser

This comment has been minimized.

Copy link
Contributor

adamcfraser commented Mar 21, 2017

@ArihantRk Can you reproduce this issue with either "*" or "Debug" logging enabled? This may provide some additional information about what Sync Gateway is waiting for.

@ArihantRk

This comment has been minimized.

Copy link

ArihantRk commented Mar 23, 2017

@adamcfraser, Issue is reproduced with "*" enabled. please have a look at gist below
https://gist.github.com/ArihantRk/d6fdb189a69dd55502edd6262c997770

@adamcfraser

This comment has been minimized.

Copy link
Contributor

adamcfraser commented Mar 23, 2017

That's helpful - it looks like the initial principals view query (triggered by the config validation that happens when there are no users in the system) is taking 5m to return results from Couchbase Server.

This slow query may be the result of reindexing on Couchbase Server after the failover (and that Couchbase Server is actually taking that long to produce the response to the view query).

@ArihantRk

This comment has been minimized.

Copy link

ArihantRk commented Mar 23, 2017

Thanks @adamcfraser , This issue seeing every time which is blocking for us. For applications it is completely outage as syncgateway not starting whenever one couchbase node failover. Any fix for this.

@djpongh djpongh added this to the 1.4.1 milestone Mar 24, 2017

@djpongh djpongh added backlog and removed ready labels Mar 24, 2017

@kirangandhi

This comment has been minimized.

Copy link

kirangandhi commented Mar 28, 2017

@adamcfraser, Any update on this issue? Any work around available to resolve the issue will be very helpful. Please advise.

@djpongh djpongh modified the milestones: 1.4.2, 1.4.1 Mar 31, 2017

@adamcfraser

This comment has been minimized.

Copy link
Contributor

adamcfraser commented Apr 3, 2017

@kirangandhi You could avoid this particular startup view query by defining a disabled user in the config. However, if the slow view response is a Couchbase Server issue, you're just going to hit it on the next view query (e.g. channel backfill, user access grant, etc).

@djpongh djpongh added ffc P1: high ffp and removed ffc labels Apr 25, 2017

@djpongh djpongh added performance ffc and removed ffp labels May 22, 2017

@djpongh djpongh added ready and removed backlog labels Jun 16, 2017

@djpongh djpongh added backlog and removed ready labels Jun 27, 2017

@djpongh djpongh added icebox and removed backlog labels Jul 27, 2017

@djpongh djpongh added this to the 2.0.0 milestone Jul 31, 2017

@djpongh djpongh removed this from the 1.5.0 milestone Jul 31, 2017

@adamcfraser adamcfraser removed their assignment Aug 23, 2017

@djpongh djpongh modified the milestones: 2.1.0, 2.0.0 Aug 28, 2017

@djpongh djpongh added backlog and removed icebox labels Mar 28, 2018

@adamcfraser

This comment has been minimized.

Copy link
Contributor

adamcfraser commented Apr 16, 2018

This is addressed in Sync Gateway 2.1. When using GSI, you have the ability to define multiple index replicas to avoid reindexing downtime after index node failover.

@adamcfraser adamcfraser removed the backlog label Apr 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment