CPU usage 100% with Couchbase java client-1.4.12

I am using couchbase-client, version: 1.4.12 with 3 nodes in cluster.
All are working fine but, some time CPU usage goes to 100% and i am getting error like:

2017-05-04 11:16:23,988 ERROR [net.spy.memcached.protocol.binary.SASLStepOperationImpl] (Memcached IO over {CouchbaseConfigConnection to /}) Error: Auth failure 2017-05-04 11:16:29,793 ERROR [net.spy.memcached.protocol.binary.SASLStepOperationImpl] (Memcached IO over {CouchbaseConfigConnection to /}) Error: Auth failure 2017-05-04 11:16:34,846 ERROR [net.spy.memcached.protocol.binary.SASLStepOperationImpl] (Memcached IO over {CouchbaseConfigConnection to /}) Error: Auth failure 2017-05-04 11:16:44,832 ERROR [net.spy.memcached.protocol.binary.SASLStepOperationImpl] (Memcached IO over {CouchbaseConfigConnection to /}) Error: Auth failure 2017-05-04 11:16:50,338 ERROR [net.spy.memcached.protocol.binary.SASLStepOperationImpl] (Memcached IO over {CouchbaseConfigConnection to /}) Error: Auth failure 2017-05-04 11:16:55,623 ERROR [net.spy.memcached.protocol.binary.SASLStepOperationImpl] (Memcached IO over {CouchbaseConfigConnection to /}) Error: Auth failure 2017-05-04 11:17:00,906 ERROR [net.spy.memcached.protocol.binary.SASLStepOperationImpl] (Memcached IO over {CouchbaseConfigConnection to /}) Error: Auth failure
I got thread dump at this time and there is 121 Threads with below stack trace :

`Memcached IO over {MemcachedConnection to / / /} - threadId:1874 - state:RUNNABLE
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296)
at sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278)
at sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)

  • locked <36d6a532> (a sun.nio.ch.Util$2)
  • locked <5320a003> (a java.util.Collections$UnmodifiableSet)
  • locked <2ba120fc> (a sun.nio.ch.WindowsSelectorImpl)
    at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
    at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:420)
    at com.couchbase.client.CouchbaseMemcachedConnection.run(CouchbaseMemcachedConnection.java:235)
    Locked ownable synchronizers:
  • None`

I analysed thread dump using this link.

but when is restart my application then it is working as normal.
I am fetching this issue randomly.
Can you suggest what is solution of this problem.

Hi @nitinvavdiya,

Which server version are you using? Was there any change in the cluster state before the error?
Also, 1.X SDK has reached its EOL and we recommend everyone move to 2.x.

We are using
Version: 4.5.0-2601 Community Edition (build-2601)
Cluster State ID: 035-25F-19.

There was no changes in cluster before this error.

You are getting an auth failure. I suspect that a password changed.

As mentioned by someone else, you should look at upgrading to a newer client. Many improvements were made. Since the client is different, there are some fairly significant changes that may need to be made (depending on the amount and type of integrations).

There’s a wiki for this: