You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Karl Wright (JIRA)" <ji...@apache.org> on 2011/01/31 08:03:11 UTC

[jira] Commented: (CONNECTORS-100) DB lock timeout

    [ https://issues.apache.org/jira/browse/CONNECTORS-100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12988666#comment-12988666 ] 

Karl Wright commented on CONNECTORS-100:
----------------------------------------

With the help of a user this evening, I *was* finally able to produce something equivalent of a hang.  The key factors seemed to be:

(1) Derby.
(2) A crawl with a large fanout, which can usually be made if there are a large number of shared images, where images are not excluded.  The specific site that caused this for me was http://www.cpa-gso.com, limited to the seed domain.
(3) The hopcount mode needs to be set to anything other than the last bullet.

When all this is true, the crawl proceeds to a certain point and then appears to hang.  The appearance is deceptive; what is actually happening is that the database is very busy indeed, but Derby is essentially losing all ability to make forward progress as a result of hopcount tracking under these conditions.

It is likely true that PostgreSQL, although it would certainly perform better, may well degrade eventually to the point where it too cannot support much in the way of forward progress under these conditions.

> DB lock timeout
> ---------------
>
>                 Key: CONNECTORS-100
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-100
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Framework core
>         Environment: Running unmodified dist/example from trunk/ using the default configuration.
>            Reporter: Andrzej Bialecki 
>            Assignee: Karl Wright
>
> When a job is started and running (via crawler-ui) occasionally it's not possible to display a list of running jobs. The problem persists even after restarting ACF. The following exception is thrown in the console:
> {code}
> org.apache.acf.core.interfaces.ACFException: Database exception: Exception doing query: A lock could not be obtained within the time requested
>         at org.apache.acf.core.database.Database.executeViaThread(Database.java:421)
>         at org.apache.acf.core.database.Database.executeUncachedQuery(Database.java:465)
>         at org.apache.acf.core.database.Database$QueryCacheExecutor.create(Database.java:1072)
>         at org.apache.acf.core.cachemanager.CacheManager.findObjectsAndExecute(CacheManager.java:144)
>         at org.apache.acf.core.database.Database.executeQuery(Database.java:167)
>         at org.apache.acf.core.database.DBInterfaceDerby.performQuery(DBInterfaceDerby.java:727)
>         at org.apache.acf.crawler.jobs.JobManager.makeJobStatus(JobManager.java:5611)
>         at org.apache.acf.crawler.jobs.JobManager.getAllStatus(JobManager.java:5549)
>         at org.apache.jsp.showjobstatus_jsp._jspService(showjobstatus_jsp.java:316)
>         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
>         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
>         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
>         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
>         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>         at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
> Caused by: java.sql.SQLTransactionRollbackException: A lock could not be obtained within the time requested
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
>         at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
>         at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
>         at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
>         at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
>         at org.apache.acf.core.database.Database.execute(Database.java:526)
>         at org.apache.acf.core.database.Database$ExecuteQueryThread.run(Database.java:381)
> Caused by: java.sql.SQLException: A lock could not be obtained within the time requested
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
>         at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
>         ... 11 more
> Caused by: ERROR 40XL1: A lock could not be obtained within the time requested
>         at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
>         at org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(Unknown Source)
>         at org.apache.derby.impl.services.locks.ConcurrentLockSet.zeroDurationLockObject(Unknown Source)
>         at org.apache.derby.impl.services.locks.AbstractPool.zeroDurationlockObject(Unknown Source)
>         at org.apache.derby.impl.services.locks.ConcurrentPool.zeroDurationlockObject(Unknown Source)
>         at org.apache.derby.impl.store.raw.xact.RowLocking2nohold.lockRecordForRead(Unknown Source)
>         at org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown Source)
>         at org.apache.derby.impl.store.access.heap.HeapController.lockRow(Unknown Source)
>         at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3.lockRowOnPage(Unknown Source)
>         at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3._lockScanRow(Unknown Source)
>         at org.apache.derby.impl.store.access.btree.index.B2IRowLockingRR.lockScanRow(Unknown Source)
>         at org.apache.derby.impl.store.access.btree.BTreeForwardScan.fetchRows(Unknown Source)
>         at org.apache.derby.impl.store.access.btree.BTreeScan.fetchNextGroup(Unknown Source)
>         at org.apache.derby.impl.sql.execute.BulkTableScanResultSet.reloadArray(Unknown Source)
>         at org.apache.derby.impl.sql.execute.BulkTableScanResultSet.getNextRowCore(Unknown Source)
>         at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown Source)
>         at org.apache.derby.impl.sql.execute.GroupedAggregateResultSet.getRowFromResultSet(Unknown Source)
>         at org.apache.derby.impl.sql.execute.GroupedAggregateResultSet.getNextRowFromRS(Unknown Source)
>         at org.apache.derby.impl.sql.execute.GroupedAggregateResultSet.loadSorter(Unknown Source)
>         at org.apache.derby.impl.sql.execute.GroupedAggregateResultSet.openCore(Unknown Source)
>         at org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore(Unknown Source)
>         at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
>         at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         ... 5 more
> {code}

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira