Kundera Cassandra -with Spring : Thread Leak seen

瀏覽次數:86 次
跳到第一則未讀訊息

nitin sharma

未讀,
2015年12月9日 下午2:48:362015/12/9
收件者:kundera-discuss
Hi All,

My application runs on Weblogic and talks to Cassandra as backend db for which we have used Kundera cassandra client...
we have also used spring framework to handle the EnitityManagerFactory lifecycle..

During our failover testing we have seen an  increase in Cassandra Connection pool thread count with the restart of cassandra node... we have seen the thread count goes upto 600+ even though we had specified "kundera.pool.size.max=40" for our 8 node Cassandra cluster..

we are using "Kundera-cassandra-2.11.1.jar" and "Kundera-core-2.11.1.jar" ..


My persistent.xml:
<?xml version="1.0" encoding="UTF-8"?>
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
    <persistence-unit name="cassandratesting">
        <provider>com.impetus.kundera.KunderaPersistence</provider>
        <properties>
       <property name="kundera.dialect" value="cassandra"/>
           
     
       <property name="kundera.nodes" value="******"/>
       <!-- the port number for the thrift protocol-->
   <property name="kundera.port" value="***"/>
   <property name="kundera.keyspace" value="***"/>
   <property name="kundera.username" value="****"/>
   <property name="kundera.password" value="*****"/>
   <property name="kundera.pool.size.max.total" value="40"/>
   <property name="kundera.pool.size.max.active" value="10"/>
   <property name="kundera.pool.size.min.idle" value="2"/>
   <property name="kundera.pool.size.max.idle" value="5"/>
   <property name="kundera.client.lookup.class" value="com.impetus.client.cassandra.thrift.ThriftClientFactory"/>      
            <property name="kundera.client.property" value="kunderaLoadTestingConfig.xml" />           
        </properties>
    </persistence-unit>
</persistence>



====================
and  KunderaLoadTestingConfig.xml

<?xml version="1.0" encoding="UTF-8"?>
<clientProperties>
  <datastores>
   <dataStore>
    <name>cassandratesting</name>
    <connection>
     <servers>
     <!-- List and configure all nodes below -->
     <server>
<host>******</host>
<port>****</port>
<properties>
<property name="kundera.username" value="****"/>
<property name="kundera.password" value="****"/>
<property name="testwhileidle" value="true"></property>
<property name="socket.timeout" value="10000"></property>
<property name="failover.policy" value="on.fail.try.one.next.available"></property>
<property name="retry" value="true"></property>
    </properties>
     </server>
</dataStore>
</datastores>
</clientProperties>


Chhavi Gangwal

未讀,
2015年12月11日 上午8:09:172015/12/11
收件者:kundera-discuss
Which version of Cassandra server are you using ? I suggest if you are using 2.2.+ , please update Kundera libraries to 3.2 as older versions are not compatible with the latest Cassandra releases.

Chhavi

nitin sharma

未讀,
2015年12月15日 上午11:51:452015/12/15
收件者:kundera-discuss
hi...

thanks for your response...

I am using 2.0.14.459 version.. and i have tried kundera 2.11.1 and 2.12.. result is same..

will 3.2 version is meant for the cassandra version mentioned above..

regards

Chhavi Gangwal

未讀,
2015年12月16日 凌晨1:49:312015/12/16
收件者:kundera-discuss
yes please use kundera-cassndra client version 3.2 for latest Cassandra version.

Chhavi

Bin Grokker

未讀,
2015年12月18日 下午6:29:032015/12/18
收件者:kundera-discuss
Hi Nitin,

Is your problem solved?

Thanks,
Bin
訊息已遭刪除

Devender Yadav

未讀,
2015年12月22日 凌晨4:00:042015/12/22
收件者:kundera-discuss

nitin sharma

未讀,
2015年12月23日 上午11:45:002015/12/23
收件者:kundera-discuss


Hi Chhavi and Ben,

Sorry for delay in my response...

i have tried with 3.2 version of Kundera limbraries and got stuck with other issue --

When i restart one of the cassandra node in the cluster, Kundera doesnt' reconnect to that node as long as the application is running.. i keep getting "java.net.SocketException: Broken pipe".. 

I am reposting my KunderLoadConfig.xml.. kindly let me know if i need to add any other parameters..

will parameters like "testonborrow,testonconnect,testonreturn"will be of any help here

<?xml version="1.0" encoding="UTF-8"?>
<clientProperties>
  <datastores>
   <dataStore>
    <name>cassandratesting</name>
    <connection>
     <servers>
     <!-- List and configure all nodes below -->
     <server>
<host>******</host>
<port>****</port>
<properties>
<property name="kundera.username" value="****"/>
<property name="kundera.password" value="****"/>
<property name="testwhileidle" value="true"></property>
<property name="socket.timeout" value="10000"></property>
<property name="failover.policy" value="on.fail.try.one.next.available"></property>
<property name="retry" value="true"></property>
    </properties>
     </server>
<properties>
    <property value="3.0.0" name="cql.version"/>
    <property value="RoundRobinPolicy" name="loadbalancing.policy"/>
    <property value="true" name="retry"/> 
     <property value="1" name="retry.delay"/> 
     <property value="10000" name="max.wait"/>
 </properties>
</connection>
</dataStore>
</datastores>
</clientProperties>

karthik prasad

未讀,
2015年12月24日 清晨6:38:422015/12/24
收件者:kundera-discuss
Did you add all the nodes in "kundera.nodes" property?

Example:

<property name="kundera.nodes" value="192.168.xx.01,192.168.xx.02,192.168.xx.03"/>

-Karthik

nitin sharma

未讀,
2015年12月26日 晚上8:24:562015/12/26
收件者:kundera-discuss
Yes Karthik, i have

that's why i am able to see same number of Cassandra-Connection thread in the beginning.. 

and after i restart one node, i dont see my code accepting the restarted node.. it keeps throwing message that node is down..


回覆所有人
回覆作者
轉寄
0 則新訊息