Hi, we are running Couch Base 4.6.2 on an AWS instance of Ubuntu 14.04. The instance has 4 CPU’s and 16GB of Memory and it runs Data and Query service on the cluster. Another cluster is 2 CPU 8 GB Ram for Indexing. We are using Memory-Optimized Global Secondary Indexes and have 8 secondary indexes and one primary index. Record count is nearly 600 (fairly less).
This problem occurs when we try to run concurrent queries to fetch data. At first, the queries get really slow then we get this error “An unknown N1QL error occurred. This is usually related to an out-of-memory condition.”
We run like 5 queries at a time to display data in dashboard. Most of are queries are similar and they look like this:
statement: ‘SELECT records.*, meta(records).id AS _id, _sync.rev as _rev, null as _sync FROM ri-qa
records WHERE type = ‘_ri_workflow’ AND meta(records).id NOT LIKE ‘_sync:%’’
statement: ‘SELECT records.*, meta(records).id AS _id, _sync.rev as _rev, null as _sync FROM ri-qa
records WHERE type = ‘_ri_user’ AND role
IN [ ‘SUPERVISOR’, ‘OPERATOR’ ] AND meta(records).id NOT LIKE ‘_sync:%’’
Sometimes it’s fine we can run 5 of these queries at once but when we try to refresh once or twice N1ql crashes. Only solution is to reboot the Data server. And sometime it gives empty responses, it’s weird.
We tried to query through the Admin GUI it gives this error:
{ “status”: “\r\n504 Gateway Time-out\r\n\r\n504 Gateway Time-out\r\nnginx/1.4.6 (Ubuntu)\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n”, “status_detail”: “The query workbench only supports queries running for 300 seconds. Use cbq from the command-line for longer running queries. Certain DML queries, such as index creation, will continue in the background despite the user interface timeout.”}
We also checked the port 8093 and it fails to connect. It has become really difficult to find the root cause of this issue. If someone helps us to figure out this issue or help us debug this, we would appreciate it a lot.