Couchbase cbq Question

When using cbq, the following error occurs.
What is the reason?

error : “read tcp → i/o timeout”
key : indexing.error

couchbase version 7.6.1 3200
cbq version 7.6.1-3200
go version go1.21.8

This is coming from indexer server to indexer client.
Is your query takes long time.

Do you have any solutions for this issue?

I have not seen this. I don’t have solution. cc @amit.kulkarni

Hi @bellpumpkin,

This error means cbq-engine has sent the index scan request to indexer, waited for 2 mins for the response, but there was no response. This error is due to TCP idle timeout for the TCP connection between cbq-engine and indexer process.

This timeout can be changed by updating indexer setting “queryport.client.readDeadline” (takes timeout in milliseconds) by calling indexer API :9102/settings

In general, we don’t expect one n1ql query to take 2 mins to send first response. Is there a possibility for query optimisation?

Hello, @amit.kulkarni

I have a dataset of approximately 760 million records. This error occurred while running a one-month data batch process. It took more than two minutes to complete, and the error occurred after about 12 minutes of query execution. I believe the query is optimized and indexes have been created.

The error still occurs even after increasing the value of queryport.client.readDeadline

Increasing it to what value?

Can you share your query and your query plan? Perhaps a different index could reduce the time needed.

Due to confidentiality constraints, I cannot provide a detailed explanation of the query and plan


Data Processing

760 million records are processed over a one-month period.
The with clause is used to create temporary tables that store intermediate results.
The where clause filters data based on a specified time range and conditions.

Index and Resource Allocation

A partition index is utilized for efficient data retrieval.
8 Query, Index nodes are allocated.
500GB of memory is allocated for Qyery Service.
400GB of memory is allocated for Index Service.

Have you tried the index advisor to see if it recommends a different index to make your query run faster? E.g., typing:

ADVISE <your query>