You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2017/11/01 00:42:05 UTC
[jira] [Commented] (DERBY-6975) ERROR 40XL1: A lock could not be
obtained within the time requested
[ https://issues.apache.org/jira/browse/DERBY-6975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16232597#comment-16232597 ]
Rick Hillegas commented on DERBY-6975:
--------------------------------------
Thanks for describing your experience, David. A couple questions:
1) Have you tried adjusting the value of derby.language.sequence.preallocator?
2) How many sessions are accessing this sequence generator concurrently?
3) Does the sequence generator correspond to a named sequence or to an identity column?
4) Does any session call Statement.getGeneratedKeys()?
3) Does any session read from SYS.SYSSEQUENCES?
Thanks,
-Rick
> ERROR 40XL1: A lock could not be obtained within the time requested
> --------------------------------------------------------------------
>
> Key: DERBY-6975
> URL: https://issues.apache.org/jira/browse/DERBY-6975
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.14.1.0
> Reporter: David Sitsky
> Priority: Major
>
> I have an application that when run on a certain dataset, every 5 runs I might see this error happening. The code is creating a lot of rows using a sequence generator.
> {noformat}
> Caused by: ERROR 40XL1: A lock could not be obtained within the time requested
> at org.apache.derby.iapi.error.StandardException.newException(StandardException.java)
> at org.apache.derby.iapi.error.StandardException.newException(StandardException.java)
> at org.apache.derby.impl.sql.catalog.SequenceUpdater.tooMuchContentionException(SequenceUpdater.java)
> at org.apache.derby.impl.sql.catalog.SequenceUpdater.getCurrentValueAndAdvance(SequenceUpdater.java)
> at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getCurrentValueAndAdvance(DataDictionaryImpl.java)
> at org.apache.derby.impl.sql.execute.BaseActivation.getCurrentValueAndAdvance(BaseActivation.java)
> at org.apache.derby.impl.sql.execute.InsertResultSet.getSetAutoincrementValue(InsertResultSet.java)
> at org.apache.derby.impl.sql.execute.BaseActivation.getSetAutoincrementValue(BaseActivation.java)
> at org.apache.derby.exe.ac560740aax015fx6bc1x68cax000002339e626a.e0(ac560740aax015fx6bc1x68cax000002339e626a.java)
> at org.apache.derby.impl.services.reflect.DirectCall.invoke(DirectCall.java)
> at org.apache.derby.impl.sql.execute.RowResultSet.getNextRowCore(RowResultSet.java)
> at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(NormalizeResultSet.java)
> at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(DMLWriteResultSet.java)
> at org.apache.derby.impl.sql.execute.InsertResultSet.getNextRowCore(InsertResultSet.java)
> at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java)
> at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java)
> at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java)
> ... 25 more
> {noformat}
> It is not clear to me why when looking at the code this should be happening.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)