You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by viz06 <vi...@yahoo.com> on 2009/05/01 13:33:03 UTC

Application waiting for database connection

Hi,

I have come across issues whereby jackrabbit calls are waiting for database
connections, this is usually during moderate to high application usage. Only
option left for me would be to restart the application in order to release
the connections. This though even after a long period of inactivity, so it
seems the connections are not been released. I am using JAckrabbit 1.4 with
Websphere 6.1.

Here is the part of thread dump 

"WebContainer : 588" daemon prio=10 tid=0x000000010085bd50 nid=0x5e2 in
Object.wait() [0xfffffffe95cf4000..0xfffffffe95cff7a8]
	at java.lang.Object.wait(Native Method)
	- waiting on <0xfffffffef9a173d0> (a java.lang.Object)
	at java.lang.Object.wait(Object.java:474)
	at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.take(Unknown Source)
	- locked <0xfffffffef9a173d0> (a java.lang.Object)
	at org.apache.jackrabbit.core.data.db.Pool.get(Pool.java:64)
	at
org.apache.jackrabbit.core.data.db.DbDataStore.getConnection(DbDataStore.java:784)
	at
org.apache.jackrabbit.core.data.db.DbDataStore.getRecord(DbDataStore.java:453)
	at
org.apache.jackrabbit.core.value.BLOBInDataStore.getDataRecord(BLOBInDataStore.java:136)
	at
org.apache.jackrabbit.core.value.BLOBInDataStore.getLength(BLOBInDataStore.java:92)
	at org.apache.jackrabbit.core.PropertyImpl.getLength(PropertyImpl.java:192)
	at org.apache.jackrabbit.core.PropertyImpl.getLength(PropertyImpl.java:689)


I am using only 2 connections for DbDataStore, could this be a cause for
this, which I really doubt?  I have increased the connection size up to 50
but I am not sure whether this a possible solution or just delaying the
inevitable. 


TIA

-- 
View this message in context: http://www.nabble.com/Application-waiting-for-database-connection-tp23331785p23331785.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Application waiting for database connection

Posted by Thomas Müller <th...@day.com>.
Hi,

Could you post your DataStore configuration, and the exact Jackrabbit
version you are using? You wrote you use version 1.4, but Jackrabbit
core is already at version 1.4.9. Maybe the problem is caused by a bug
that was fixed in the meantime.

I suggest to use set maxConnections to 3 or higher. See also
http://wiki.apache.org/jackrabbit/DataStore "maxConnections: Set the
maximum number of concurrent connections in the pool. At least 3
connections are required if the garbage collection process is used."

50 connections should be enough, unless your application is guaranteed
to completely read binary objects once they are open. An alternative
is to use copyWhenReading.

Regards,
Thomas