You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Nuno Carvalho <nu...@di.fc.ul.pt> on 2006/11/21 12:54:30 UTC

lock could not be obtained within the time requested

Hi all,

I'm testing Derby with 100 clients replaying a trace of TPC-W  
transactions and I'm having this problem after some time:

org.apache.derby.client.am.SqlException: A lock could not be obtained  
within the time requested
         at org.apache.derby.client.am.ResultSet.completeSqlca 
(Unknown Source)
         at  
org.apache.derby.client.net.NetResultSetReply.parseFetchError(Unknown  
Source)
         at  
org.apache.derby.client.net.NetResultSetReply.parseCNTQRYreply 
(Unknown Source)
         at org.apache.derby.client.net.NetResultSetReply.readFetch 
(Unknown Source)
         at org.apache.derby.client.net.ResultSetReply.readFetch 
(Unknown Source)
         at org.apache.derby.client.net.NetResultSet.readFetch_ 
(Unknown Source)
         at org.apache.derby.client.am.ResultSet.flowFetch(Unknown  
Source)
         at org.apache.derby.client.net.NetCursor.getMoreData_ 
(Unknown Source)
         at org.apache.derby.client.am.Cursor.next(Unknown Source)
         at org.apache.derby.client.am.ResultSet.nextX(Unknown Source)
         at org.apache.derby.client.am.ResultSet.next(Unknown Source)
         at TracePlayer.playTransaction(TraceReplay.java:379)
         at TracePlayer.run(TraceReplay.java:461)

Any ideas for how to increase the wait time for obtaining locks and/ 
or avoiding this problem some how?

Thanks,
--
Nuno Carvalho
University of Lisbon, Portugal
http://dialnp.di.fc.ul.pt




Re: lock could not be obtained within the time requested

Posted by Rajesh Kartha <ka...@gmail.com>.
Nuno Carvalho wrote:

>
> Any ideas for how to increase the wait time for obtaining locks and/or 
> avoiding this problem some how?
>
>
>
>
The are many properties that could be set for tuning Derby. You can find 
them in the tuning guide at:

http://db.apache.org/derby/docs/dev/tuning/ctunproper22250.html

Do take a look at this list for the ones that could be helpful in you case.

The property at the database side to increase default timeout is 
*derby.locks.waitTimeout (default is 60 seconds).
*You can either set this as a system wide property in the derby.property 
file  OR within the database.
*
Regards
-Rajesh

*