Server`s process exception while using Java API to query doc with N1QL


I was lookup doc by N1ql from bucket ,there are 3 million+ doc in the bucket,i want to retrieve 50000 documents by java like this:

query ("*")
+" and ExpireDate>\""+effectdate+"\""
+" and  EffectDate<\""+expiredate+"\"")

I begin retrieve for a while ,then i found one node was down from the UI, i stop retrive but the issue node was keeping high resource used that 99% cpu usage and keep using all along.



first if you are using the Java fluent API, you should use it in the whole query like so""*").from(i("PriceCheckDB_second"))

You should also make sure you set a timeout to your query. Can you also show us the code you are using for the query?

About the 99% usage, either your setup is under size, either we have a bug. We need more informations about your setup.


Why do i can not use your code,i use client 2.2,it doesn`t have the ‘x’、‘i’ method .
my code is that :

   + " and ExpireDate>\""+effectdate+"\""+" and EffectDate<\""+expiredate+"\""))
.subscribe(result -> {
        e -> System.err.println("N1QL Error/Warning: " + e),
        runtimeError -> runtimeError.printStackTrace()


and i haven’t setup couchbase or system’s parameter


About x() and i() methods not working, that is because those are static methods from the Expression class. use a static import like so:

static import*;

not sure what you mean in you second message…