[jira] [Resolved] (CONNECTORS-100) DB lock timeout, and/or indefinite or excessive database activity

2011-11-02 Thread Karl Wright (Resolved) (JIRA)

 [ 
https://issues.apache.org/jira/browse/CONNECTORS-100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Karl Wright resolved CONNECTORS-100.


Resolution: Fixed

 DB lock timeout, and/or indefinite or excessive database activity
 -

 Key: CONNECTORS-100
 URL: https://issues.apache.org/jira/browse/CONNECTORS-100
 Project: ManifoldCF
  Issue Type: Bug
  Components: Framework core
Affects Versions: ManifoldCF 0.1, ManifoldCF 0.2, ManifoldCF 0.3, 
 ManifoldCF 0.4
 Environment: Running unmodified dist/example from trunk/ using the 
 default configuration.
Reporter: Andrzej Bialecki 
Assignee: Karl Wright
 Fix For: ManifoldCF 0.4


 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 
 

[jira] [Commented] (CONNECTORS-284) HSQLDB load test runs out of memory and has lots of very slow queries

2011-11-02 Thread Karl Wright (Commented) (JIRA)

[ 
https://issues.apache.org/jira/browse/CONNECTORS-284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13142390#comment-13142390
 ] 

Karl Wright commented on CONNECTORS-284:


Everything looks good for HSQLDB except for two things:

(1) The stuffer query does not read preferentially out of the order-by index, 
and there seems to be no good way to do that with HSQLDB.  Rule is that you 
must mention the order-by constraint in the WHERE clause for this to happen.  
This means that you have to say something like docpriority  0.  The 
recommendation is thus to use a nested query (SELECT * from jobqueue where 
docpriority  0 AND EXISTS(...) ORDER BY docpriority ASC) to force the read 
from the ordering index.  But since the state of document is not taken into 
account at this level it is possible that a lot of work would need to be done 
in pathological cases, unless I could guarantee that a doc priority only 
appeared at all if the document was in the right state.  I also don't want to 
break Postgresql, which I believe is capable of working with indexes of the 
form (ordering clauses, where clauses).

(2) The rules as far as the index matching are concerned in HSQLDB give 
precedence to non-parenthesized expressions over parenthesized ones, eg. (A or 
B or C) AND E will use an index on E preferentially.  I have to find a way to 
prevent this from messing up some of our queries.


 HSQLDB load test runs out of memory and has lots of very slow queries
 -

 Key: CONNECTORS-284
 URL: https://issues.apache.org/jira/browse/CONNECTORS-284
 Project: ManifoldCF
  Issue Type: Bug
  Components: Framework core
Affects Versions: ManifoldCF 0.4
Reporter: Karl Wright
Assignee: Karl Wright
 Fix For: ManifoldCF 0.4


 Some of the long-running queries are as follows:
 - document stuffer query
 - locating carrydown information

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira