lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Palmer, Andrew MMI Woking" <andrew.pal...@vnuinc.co.uk>
Subject RE: QueryParser Exceptions only under load?
Date Mon, 15 Aug 2005 16:03:20 GMT
Andrew,

My initial thought is that you are reusing the QueryParser for each of
the requests.  It is not a thread safe object.

I was getting similar problems and changing the way that I used the
QueryParser fixed it.  This was on 1.4.3 so it might be different.

Andrew


-----Original Message-----
From: Andrew Boyd [mailto:andrew.boyd@mindspring.com] 
Sent: 15 August 2005 16:54
To: java-user@lucene.apache.org
Subject: QueryParser Exceptions only under load?

Hi all,
  I'm running lucene 1.9-rc with jdk 1.5/5.0 on JBoss 3.6 with tomcat
5.0.
I'm using JMeter to do my load testing.  I'm getting several different
exceptions (NullPointer, ArrayIndexOutofBounds and ParseException) from
QueryParser when I simulate 5 users (threads in JMeter)with no pausing
between http queries.  The exceptions are sporatic meaning I had to run
it about 10 or more times so I could copy the stacktraces for you:

///// NullPointer
10:40:26,266 ERROR [Utils] QueryString : bomb
10:40:26,282 INFO  [STDOUT] java.lang.NullPointerException
10:40:26,282 INFO  [STDOUT]     at
java.lang.String.<init>(String.java:205)
10:40:26,282 INFO  [STDOUT]     at
org.apache.lucene.queryParser.FastCharStream.GetImage(Unknown Source)
10:40:26,282 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParserTokenManager.jjFillToken(Unknow
n Source)
10:40:26,282 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParserTokenManager.getNextToken(Unkno
wn Source)
10:40:26,282 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.jj_ntk(Unknown Source)
10:40:26,282 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.Modifiers(Unknown Source)
10:40:26,282 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
10:40:26,282 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
10:40:26,282 INFO  [STDOUT]     at
net.bbtech.kat.search.BaseSearchType.getQuery(BaseSearchType.java:60) 

/////ArrayIndexOutOfBoundsException
10:43:19,972 ERROR [Utils] QueryString : mines playgrounds
10:43:19,988 INFO  [STDOUT] java.lang.ArrayIndexOutOfBoundsException: -1
10:43:19,988 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParserTokenManager.jjMoveNfa_3(Unknow
n Source)
10:43:19,988 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParserTokenManager.jjMoveStringLitera
lDfa0_3(Unknown Source)
10:43:19,988 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParserTokenManager.getNextToken(Unkno
wn Source)
10:43:19,988 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.jj_scan_token(Unknown Source)
10:43:19,988 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.jj_3_1(Unknown Source)
10:43:19,988 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.jj_2_1(Unknown Source)
10:43:19,988 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source)
10:43:19,988 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
10:43:19,988 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
10:43:19,988 INFO  [STDOUT]     at
net.bbtech.kat.search.BaseSearchType.getQuery(BaseSearchType.java:60)

10:47:58,167 ERROR [Utils] QueryString : explosives camp
10:47:58,494 INFO  [STDOUT]
org.apache.lucene.queryParser.ParseException: Encountered "<EOF>" at
line 1, column 4.
Was expecting one of:
    <AND> ...
    <OR> ...
    <NOT> ...
    "+" ...
    "-" ...
    "(" ...
    "^" ...
    <QUOTED> ...
    <TERM> ...
    <FUZZY_SLOP> ...
    <PREFIXTERM> ...
    <WILDTERM> ...
    "[" ...
    "{" ...
    <NUMBER> ...
    ":" ...

10:47:58,494 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.generateParseException(Unknown
Source)
10:47:58,494 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.jj_consume_token(Unknown
Source)
10:47:58,494 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.Clause(Unknown Source)
10:47:58,494 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.Query(Unknown Source)
10:47:58,525 INFO  [STDOUT]     at
org.apache.lucene.queryParser.QueryParser.parse(Unknown Source)
10:47:58,541 INFO  [STDOUT]     at
net.bbtech.kat.search.BaseSearchType.getQuery(BaseSearchType.java:66)

My load test is running on the same box as my search engine a Thinkpad
G41 with a P4 3.33GHz with 1.5 GB of RAM.

The queries are the same whether I'm running one user or 5 users.  I
expect that these exceptions are happining just because of the load but
I thought I'd post them to get comments recomendations?

Thanks,

Andrew


Andrew Boyd
Software Architect
Sun Certified J2EE Architect
B&B Technical Services Inc.
205.422.2557

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message