jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sbarriba" <sbarr...@yahoo.co.uk>
Subject Logging/Detecting slow JCR queries with Lucene
Date Tue, 24 Jun 2008 07:47:16 GMT
Hi all,

Our application makes quite heavy use of JCR queries. We're seeing some
scenarios where the IO utilisation is very high for a period of time. A
thread dump of Tomcat shows lots and lots of threads locked waiting on
<0x781fe1d0> (a org.apache.lucene.store.FSDirectory$FSIndexInput which is
locked by the thread below.

 

Given we have 140+ queries being used, is there a way to configure
JackRabbit and/or Lucene to log out slow queries equivalent to the
"log-slow-queries" provided by MySql?

 

Regards,

Shaun

 

 

Thread owning the lock

 

"TP-Processor6806" daemon prio=1 tid=0x6a94ff58 nid=0x2121 runnable
[0x67cf2000..0x67cf3da0]

    at java.io.RandomAccessFile.readBytes(Native Method)

    at java.io.RandomAccessFile.read(RandomAccessFile.java:315)

    at
org.apache.lucene.store.FSDirectory$FSIndexInput.readInternal(FSDirectory.ja
va:550)

    - locked <0x782053c8> (a
org.apache.lucene.store.FSDirectory$FSIndexInput$Descriptor)

    at
org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java
:122)

    at
org.apache.lucene.index.CompoundFileReader$CSIndexInput.readInternal(Compoun
dFileReader.java:240)

    - locked <0x781fe1d0> (a
org.apache.lucene.store.FSDirectory$FSIndexInput)

    at
org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:14
3)

    at
org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:
38)

    at org.apache.lucene.store.IndexInput.readVInt(IndexInput.java:57)

    at
org.apache.lucene.index.SegmentTermDocs.next(SegmentTermDocs.java:109)

    at
org.apache.lucene.index.FilterIndexReader$FilterTermDocs.next(FilterIndexRea
der.java:47)

    at
org.apache.jackrabbit.core.query.lucene.ReadOnlyIndexReader$FilteredTermDocs
..next(ReadOnlyIndexReader.java:281)

    at org.apache.lucene.index.MultiTermDocs.next(MultiReader.java:375)

    at
org.apache.jackrabbit.core.query.lucene.ChildAxisQuery$ChildAxisScorer.calcu
lateChildren(ChildAxisQuery.java:338)

    at
org.apache.jackrabbit.core.query.lucene.ChildAxisQuery$ChildAxisScorer.next(
ChildAxisQuery.java:268)

    at org.apache.lucene.search.Scorer.score(Scorer.java:48)

    at
org.apache.jackrabbit.core.query.lucene.ChildAxisQuery$ChildAxisScorer.calcu
lateChildren(ChildAxisQuery.java:317)

    at
org.apache.jackrabbit.core.query.lucene.ChildAxisQuery$ChildAxisScorer.next(
ChildAxisQuery.java:268)

    at org.apache.lucene.search.Scorer.score(Scorer.java:48)

    at
org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$DescendantSe
lfAxisScorer.collectContextHits(DescendantSelfAxisQuery.java:305)

    at
org.apache.jackrabbit.core.query.lucene.DescendantSelfAxisQuery$DescendantSe
lfAxisScorer.next(DescendantSelfAxisQuery.java:254)

    at org.apache.lucene.search.Scorer.score(Scorer.java:48)

    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:146)

    at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:124)

    at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:74)

    at org.apache.lucene.search.Hits.<init>(Hits.java:61)

    at org.apache.lucene.search.Searcher.search(Searcher.java:55)

    at
org.apache.jackrabbit.core.query.lucene.SearchIndex.executeQuery(SearchIndex
..java:658)

    at
org.apache.jackrabbit.core.query.lucene.QueryResultImpl.executeQuery(QueryRe
sultImpl.java:242)

    at
org.apache.jackrabbit.core.query.lucene.QueryResultImpl.getResults(QueryResu
ltImpl.java:290)

    at
org.apache.jackrabbit.core.query.lucene.QueryResultImpl.<init>(QueryResultIm
pl.java:192)

    at
org.apache.jackrabbit.core.query.lucene.QueryImpl.execute(QueryImpl.java:138
)

    at
org.apache.jackrabbit.core.query.QueryImpl.execute(QueryImpl.java:176)

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message