Couchbase Java Client connection issue on weblogic


#1

Hi all,

While deploying the code on weblogic couchbase Java client create 4 connections but when i redeploy same app again it’s not closing the previous connections and added 4 more , so total connection is 8 now . How can I close/release this connection on my web application while redeploying app on weblogic .

After multiple deployment I’m getting the below error .

java.lang.RuntimeException: java.util.concurrent.TimeoutException
at com.couchbase.client.java.util.Blocking.blockForSingle(Blocking.java:93)
at com.couchbase.client.java.CouchbaseCluster.openBucket(CouchbaseCluster.java:108)
at com.couchbase.client.java.CouchbaseCluster.openBucket(CouchbaseCluster.java:99)
at com.couchbase.client.java.CouchbaseCluster.openBucket(CouchbaseCluster.java:89)

I’m using Couchbase Java Client 2.1.3 with JDK 1.6 with Spring 2. with Weblogic 8.1


#2

how do you measure the number of connections? is that because some threads are not killed upon redeploy?

there’s been an improvement on resource cleanup front in 2.1.4 so you should probably upgrade (see https://www.couchbase.com/issues/browse/JVMCBC-201).

:warning: but note that RxJava itself is currently not very adapted to hot-redeploy and will “leak” threads (see this topic and the corresponding RxJava ongoing discussion in PR #3149).