N1QL Not responding without Couchbase restart


#1

Hello,

We are currently running Couchbase Version: 4.5.1-2844 Community Edition and facing the problem many times Per Day were N1QL stop responding.

When the issue appears the N1QL queries never returns back without Couchbase restart. After Couchbase restart i have found below two logs in Couchbase log:

1). *******************************************************
Compactor for view builderCycleNew/_design/sync_housekeeping (pid [{type,
view},
{name,
<<“builderCycleNew/_design/sync_housekeeping”>>},
{important,
false},
{fa,
{#Fun<compaction_new_daemon.25.102846360>,
[<<“builderCycleNew”>>,
<<"_design/sync_housekeeping">>,
{config,
{30,
undefined},
{30,
undefined},
undefined,
false,
false,
{daemon_config,
30,
131072,
20971520}},
false,
{[{type,
bucket}]}]}}]) terminated unexpectedly (ignoring this): {badmatch,
{error,
{{case_clause,
{{error,
vbucket_stream_not_found},
{bufsocket,
#Port<11584.10107>,
<<>>}}},
[{couch_dcp_client,
init,
1,
[{file,
"/home/couchbase/jenkins/workspace/watson-unix/couchdb/src/couch_dcp/src/couch_dcp_client.erl"},
{line,
299}]},
{gen_server,
init_it,
6,
[{file,
“gen_server.erl”},
{line,
304}]},
{proc_lib,
init_p_do_apply,
3,
[{file,
“proc_lib.erl”},
{line,
239}]}]}}}
2). **********************************************************************
Compactor for view mapreduce_view/builderCycleNew/_design/sync_housekeeping/main (pid [{type,
view},
{important,
true},
{name,
<<“mapreduce_view/builderCycleNew/_design/sync_housekeeping/main”>>},
{fa,
{#Fun<compaction_new_daemon.23.102846360>,
[<<“builderCycleNew”>>,
<<"_design/sync_housekeeping">>,
mapreduce_view,
main,
{config,
{30,
undefined},
{30,
undefined},
undefined,
false,
false,
{daemon_config,
30,
131072,
20971520}},
false,
{[{type,
bucket}]}]}}]) terminated unexpectedly: {badmatch,
{error,
{{case_clause,
{{error,
vbucket_stream_not_found},
{bufsocket,
#Port<11584.10107>,
<<>>}}},
[{couch_dcp_client,
init,
1,
[{file,
"/home/couchbase/jenkins/workspace/watson-unix/couchdb/src/couch_dcp/src/couch_dcp_client.erl"},
{line,
299}]},
{gen_server,
init_it,
6,
[{file,
“gen_server.erl”},
{line,
304}]},
{proc_lib,
init_p_do_apply,
3,
[{file,
“proc_lib.erl”},
{line,
239}]}]}}}


#2

These seem to be from views used for sync gateway.

What do you see in query.log?


#3

We have not written any extra condition in sync gateway for view. We are using default setting of sync gateway.

Can you elaborate about views used for sync gateway?


#4

Hello Keshav,

In query.log file we are getting below logs:

2017-08-23T16:12:49.737+05:30 [Info] connected with 1 indexers
2017-08-23T16:12:49.737+05:30 [Info] index 14462765891118226397 has 1 replicas
2017-08-23T16:12:49.737+05:30 [Info] index 14841920933843660011 has 1 replicas
2017-08-23T16:12:49.737+05:30 [Info] GSIC[default/builderCycleNew-1503323269692654053] logstats “builderCycleNew” {“gsi_scan_count”:1289,“gsi_scan_duration”:8857159991,“gsi_throttle_duration”:654923150,“gsi_prime_duration”:4788195954,“gsi_blocked_duration”:33645358,“gsi_totalbackfills”:46}
2017-08-23T16:12:49.737+05:30 [Info] client load stats {“14462765891118226397”: 2.232569352177366e+07,“14841920933843660011”: 1.2909143104328647e+07}


2017-08-23T17:25:51.394+05:30 [Info] connected with 1 indexers
2017-08-23T17:25:51.394+05:30 [Info] index 14462765891118226397 has 1 replicas
2017-08-23T17:25:51.394+05:30 [Info] index 14841920933843660011 has 1 replicas
2017-08-23T17:25:51.394+05:30 [Info] GSIC[default/builderCycleNew-1503485091342101763] logstats “builderCycleNew” {“gsi_scan_count”:206,“gsi_scan_duration”:2253899032,“gsi_throttle_duration”:346044108,“gsi_prime_duration”:768119808,“gsi_blocked_duration”:14732642,“gsi_totalbackfills”:1}
2017-08-23T17:25:51.394+05:30 [Info] client load stats {“14462765891118226397”: 1.4955138558796212e+07}
2017-08-23T17:26:51.395+05:30 [Info] GSIC[default/builderCycleNew-1503485091342101763] logstats “builderCycleNew” {“gsi_scan_count”:208,“gsi_scan_duration”:2303636489,“gsi_throttle_duration”:368392673,“gsi_prime_duration”:778311901,“gsi_blocked_duration”:14732642,“gsi_totalbackfills”:1}


2017-08-23T17:40:13.432+05:30 [Info] connected with 1 indexers
2017-08-23T17:40:13.432+05:30 [Info] index 14462765891118226397 has 1 replicas
2017-08-23T17:40:13.432+05:30 [Info] index 14841920933843660011 has 1 replicas
2017-08-23T17:40:13.432+05:30 [Info] client load stats {“14462765891118226397”: 6.925790776318176e+06}
2017-08-23T17:40:13.447+05:30 [Info] GSIC[default/builderCycleNew-1503489613445696855] logstats “builderCycleNew” {“gsi_scan_count”:37,“gsi_scan_duration”:504482041,“gsi_throttle_duration”:77167512,“gsi_prime_duration”:144848964,“gsi_blocked_duration”:0,“gsi_totalbackfills”:0}


#5

Hi Everyone,

My issue has been resolved after implementing the indexing.